Finally, the VLOOKUP will return $500 in the cell B3 for “Product A”. Therefore, the “Sales” for John in Table 2 will be $500. As we can see, the value of “Salesman” for “Product A” in Table 1 is John. Drag the formula down to the other cells in the column by clicking and dragging the little “+” icon at the bottom-right of the cell.=Īs a result, we will get sales $500 in the cell J3.To use nested VLOOKUP, we need to follow these steps: range_lookup – has value 0, because we want to find an exact match of “Sales” values.table_array – the s econd table ( $E$3:$G$7).Lookup_value – nested VLOOKUP result (John).This value will be lookup_value for the main VLOOKUP since we want to find Sales value for John in the second table.įormula explanation for the first VLOOKUP: The result of this “inner” VLOOKUP will be “John” from cell C3 of the Table 1. range_lookup – has value 0, because we want to find an exact match of “Salesman” values.col_index_num2 – has value 2, as we want to pull value from the second column of the range.table_array – the first table ( $B$3:$C$7).The goal is to obtain Salesman name from the Tabel 1 who sells Product A.įormula parts for the nested VLOOKUP will look like: We will first explain nested VLOOKUP formula part. In our example, lookup_value of the main VLOOKUP is nested VLOOKUP. After that, we will lookup for “Sales” in Table 2 with “Salesman” from Table 1.įigure 3.Get the Sales Values Using Nested VLOOKUPĪs we can see in the picture, we don’t have a direct connection between “Product” and “Sales” columns in Table 2.In order to use VLOOKUP, the lookup column must be the leftmost.īecause of this, we will have to follow the next steps: Therefore, we will use the second table which has a connection with both tables. The nested VLOOKUP allows us to get value from a lookup table, even when we don’t have a direct relation to the main table. =VLOOKUP(VLOOKUP(lookup_value1, table_array1, col_index_num1, range_lookup),table_array2, col_index_num2, range_lookup) Since single VLOOKUP function is not working, we will have to use nested VLOOKUP function: In VLOOKUP function table_array must be on the left side of the column from which we want to extract the data. If we try to use VLOOKUP function as in the example below, an error will appear. This means that we want to find an exact match for a lookup value.
Col_index_num – a column number in a lookup table from which we want to pull the data.Table_array – a table in which we want to look up.Lookup_value – a value which we want to find in a lookup table.
The parameters of the VLOOKUP function are: =VLOOKUP(lookup_value, table_array, col_index_num, range_lookup) The generic formula syntax for VLOOKUP is: If we want to pull the data from another table we can use VLOOKUP function. The second table, Table 2, consists of 3 columns:Īs a result, we want to get sales value in the third table (column J), depending on a product (column I). Above all, let’s start with examining the structure of the data that we will use. We will now look at the example to explain in details how this function works.
How to use vlookup in excel 2019 how to#
In this tutorial, we will learn how to nest VLOOKUP function in order to look up for a value. This is possible by nesting VLOOKUP function. While working in VLOOKUP function in Excel, we may need to look up for values in multiple tables.