Lookup tables in excel are a named tables which are used with vlookup function to find any data, when we have a large amount of data and we do not know where to look we can select the table and give it a name and while using the vlookup function instead of giving the reference we can type the name of the table as a reference to look up the value, such table is known as lookup table in excel.
How to Create a Lookup Table in Excel?
Lookup functions are lifesavers in excel. Based on the available value or lookup value, we can fetch the other data associated with it in the different data tables. In excel, VLOOKUP is the most commonly used lookup function.
In this article, we will discuss some of the important lookup function in excel and also how to create a lookup table in excel. Important lookup functions are VLOOKUP & HLOOKUP, V stands for Vertical Lookup, and H stands for Horizontal Lookup. We have the function called LOOKUP as well to look for the data in the table.
Using these lookup functions, we can fetch the available data’s other information from different worksheets as well as from different workbooks.
#1 – Create a Lookup Table Using VLOOKUP Function
As I told, VLOOKUP is the traditional lookup function all most all the users use regularly. We will show you how to look for values using this lookup function.
- Lookup Value is nothing but the available value. Based on this value, we are trying to fetch the data from the other table.
- Table Array is simply the main table where all the information resides.
- Col Index Num is the nothing but from which column of the table array we want the data. We need to mention the column number here.
- Range Lookup is nothing but whether you are looking for an exact match or an approximate match. If you are looking for the exact match, then FALSE or 0 is the argument; if you are looking for the approximate match, then TRUE or 1 is the argument.
Example of VLOOKUP Function: Assume below is the data you have of product sales and their sales amount.
Now, in the cell D2, you one product id, and using this product id, you have to fetch the sales value using VLOOKUP.
Follow this steps:
- Apply the VLOOKUP function and open the formula first.
- The first argument is the LOOKUP Value. Lookup value is our base or available value. So select the cell D2 as the reference.
- Next is the table array; this is nothing but our main table where all the data resides. So select the table array as A2 to B11.
- Now press the F4 function key to make it an absolute excel referenceAbsolute Excel ReferenceAbsolute reference in excel is a type of cell reference in which the cells being referred to do not change, as they did in relative reference. By pressing f4, we can create a formula for absolute referencing.. It will insert the dollar symbol to the selected cell.
- The next argument is column index number, from the selected table from which column actually you are looking for the data. In this case, we have selected two columns, and we need the data from the 2nd column, so mention 2 as the argument.
- Now, the final argument is range lookup, i.e., type of lookup. Since we are looking at an exact match, select FALSE or enter zero as the argument.
- Close the bracket and hit the enter key. We should have the sales value for the product id Prd 5.
- What if we want the sales data for the product if Prd6. Of course, we can directly enter, but this is not the right approach to do. Rather we can create the drop-down list in excel and allow the user to select from the drop-down list. Press ALT + A + V + V in the cell D2; this is the shortcut key, which is the shortcut key to create data validation in excelCreate Data Validation In ExcelData validation in Excel is used to limit a user's inputs to specified cells or input ranges by offering pre-defined inputs for selection to avoid multiple redundant data inputs..
- Select the LIST from Allow: dropdown.
- In the SOURCE: select the Product ID list from A2 to A11.
- Click on the OK. We have all the list of products in the cell D2 now.
#2 – Use LOOKUP Function to Create a LOOKUP Table in Excel
Instead of VLOOKUP, we can also use the LOOKUP function in excelLOOKUP Function In ExcelThe LOOKUP excel function searches a value in a range (single row or column). It returns a corresponding match from the exact position of another range. The corresponding match is a piece of information associated with the value being searched. as an alternative. Let’s look at the formula of the LOOKUP function.
- Lookup Value is the base value or available value.
- Lookup Vector is nothing but a lookup value column in the main table.
- Result Vector is nothing but requires a column in the main table.
Let’s apply the formula to understand the logic of the LOOKUP function.
Step 1: Open the lookup function now.
Step 2: Lookup value is Product Id, so select the D2 cell.
Step 3: Lookup vector is nothing but the ProductId column in the main table. So select A1 to A11 as the range.
Step 4: Next up results vector, this is nothing but from which column we need the data to be fetched. In this case, from B1 to B11, we want the data to be fetched.
Step 5: Close the bracket and hit enter to close the formula. We should have sales value for the selected product id.
Step 6: Change the Product ID to see a different result.
#3 – Use INDEX + MATCH Function
VLOOKUP function can fetch the data from left to right, but with the help of the INDEX FunctionINDEX FunctionWhen the index function is used individually in Excel, it displays the value of the cell when we give it a position from a table array. When the index function is combined with the match function, it acts as a substitute for the VLOOKUP function. and MATCH formula in excel, we can fetch data from anywhere to create a LOOKUP Excel Table
Step 1: Open the INDEX formula ExcelINDEX Formula ExcelWhen the index function is used individually in Excel, it displays the value of the cell when we give it a position from a table array. When the index function is combined with the match function, it acts as a substitute for the VLOOKUP function. first.
Step 2: For the first argument, select the result column in the main table.
Step 3: In order to get the row number, we need to apply the MATCH function. Refer below image for the MATCH function.
Step 4: Close the bracket and close the formula. We will have results.
Things to Remember
- The lookup should be the same as in the main table in excel.
- VLOOKUP works from left to right, not from right to left.
- In the LOOKUP function, we just need to select the result column, need not mention the column index number, unlike VLOOKUP.
This has been a guide to LOOKUP Table in Excel. Here we discuss How to Create a LOOKUP Table in Excel using VLOOKUP, Index, and Match formula along with practical examples and a downloadable excel template. You may learn more about excel from the following articles –