When looking up information in Microsoft Excel, you’ll regularly need to compare data against a table—and tables can be found in a variety of locations and formats. For example, in the image above you may need to find the appropriate tax rate in the table on the right for a given employee’s salary listed in the table on the left.
On the Formulas tab in the Excel ribbon, you’ll see a categories function called Look up and Reference. The two key functions for this type of task are VLOOKUP (V meaning vertical) and its companion function HLOOKUP (H meaning horizontal).
Why two functions instead of one? As shown in the image below, data tables can be found in horizontal and vertical orientations—so with two dedicated functions, you’re covered either way.
Let’s take a straightforward look at how the HLOOKUP and VLOOKUP functions are written (this graphic shows an HLOOKUP function but the syntax for VLOOKUP is identical).
The four comma-separated parameters you can specify for the HLOOKUP and VLOOKUP functions are:
Lookup Value: the cell containing the value you’re searching for in your data table
Table Array: Excel looks for a match to your Lookup Value within this range of cells
Row (Column) Index Number: the number of the table row in the same column as the matched cell that holds the value you want (For a VLOOKUP function, the orientation changes, and you’re specifying the table column in the same row as the matched cell. Make sense?)
Range Lookup: an optional true/false value—set to False to return exact matches only and set to True (or just leave out this parameter entirely) to return the closest match to your lookup value
As you can see, VLOOKUP and HLOOKUP are incredibly helpful functions to know for any data-matching tasks in Excel 2013. For more details on these functions among many others, be sure to watch Dennis Taylor’s course Excel 2013: Advanced Formulas and Functions.