


Now we need to make a selection of data using the VLOOKUP function separately for the product and sum up the sales for the first quarter. There we will record the sales amounts in the first quarter as shown in the picture:Īs you can see, the second table also needs to be changed a little, so as not to lose the essence of the task. Expand the amount of data in the first table by adding columns: "January", "February", "March". Let's slightly complicate the task changing the structure and increasing the amount of data in the table. The VLOOKUP function in Excel and the two tables When a query is created to the database, the results are output which is a response to the query criteria. The function allows us to quickly find the data and get all the necessary values from the large tables. Now enter the names of the goods for which we need to know its price under the column headline of the second table "Name product". In the "Col_index_num" field we enter the value "2", because in the second column we have the price that we want to receive when searching for the goods. In the "Table_array" field enter the range of all values of the first table A3: B7. In the "Lookup_value" field, we enter a reference to the cell under the product name of the second table D3.

When I change the ID value, everything works.Īnd, because I'm using a table, I can easily add more data, and the same formulas will continue to work without edits.įinally, using match this way provides a really nice benefit: I can easily reorder fields in the output formulas, or, in the table itself, and the VLOOKUP formulas keep working.How the VLOOKUP function works in Excel: an example I'll go ahead and remove the helper column.

When I copy the formula down, I get a result for each field. This is an example of nesting functions inside a formula. Now I just need to copy MATCH formula into VLOOKUP to replace the hardcoded column index. When I copy the formula down, I get a numeric index for each field. To demonstrate, I'll use MATCH in column L by itself. Since the names in column J match values in the table header, I can use the MATCH function get an index for each field. You might wonder if there's an easy way to avoid hardcoding the column number in the formula? If I copy the formula down to the next row, I only need to adjust the column number to get last name.Īnd, I can do the same for all the other fields. When I enter the formula, we get "Julie", which is correct. Match type is zero or false, since I want to force an exact match. In this table, the ID is the leftmost column, so we can get any value.įor column ID, I need 2, since the first name is the second column in the table. Now, because VLOOKUP only looks to the right, it's important that the lookup is to the left of values we we want to retrieve. Now I'll write the first VLOOKUP formula.įor the lookup, I want the value from K4, locked so it doesn't change when I copy the formula down.įor table array, I want the lookup table itself, Table1. Then I'll add some formatting, and an ID value so I have something to match against.
#HOW TO DO VLOOKUP IN EXCEL 2016 ON MAC HOW TO#
To illustrate how to work with VLOOKUP when the source data is in a table, I'll set up formulas to the right to extract data from the table, matching on an employee ID.įirst, I'll select the table header and use paste special with transpose to get the field values. On this worksheet, I have a table that contains employee data, named Table1. In this video, we'll look at how to use VLOOKUP to lookup values in an Excel Table.
