Look Up a Single Value with VLOOKUP and HLOOKUP in Excel
The most popular of the lookup functions in Excel 2013 are HLOOKUP (for Horizontal Lookup) and VLOOKUP (for Vertical Lookup) functions. These functions are located on the Lookup & Reference drop-down menu on the Formulas tab of the Ribbon as well as in the Lookup & Reference category in the Insert Function dialog box.
They are part of a powerful group of functions that can return values by looking them up in data tables.
The VLOOKUP function searches vertically (from top to bottom) the leftmost column of a Lookup table until the program locates a value that matches or exceeds the one you are looking up. The HLOOKUP function searches horizontally (from left to right) the topmost row of a Lookup table until it locates a value that matches or exceeds the one that you’re looking up.
The VLOOKUP function uses the following syntax:
VLOOKUP(lookup_value,table_array,col_index_num,[range_lookup])
The HLOOKUP function follows the nearly identical syntax:
HLOOKUP(lookup_value,table_array,row_index_num,[range_lookup])
In both functions, the lookup_value argument is the value that you want to look up in the Lookup table, and table_array is the cell range or name of the Lookup table that contains both the value to look up and the related value to return.
The col_index_num argument in the VLOOKUP function is the number of the column whose values are compared to the lookup_value argument in a vertical table. The row_index_num argument in the HLOOKUP function is the number of the row whose values are compared to the lookup_value in a horizontal table.
When entering the col_index_num or row_index_num arguments in the VLOOKUP and HLOOKUP functions, you must enter a value greater than zero that does not exceed the total number of columns or rows in the Lookup table.
The optional range_lookup argument in both the VLOOKUP and the HLOOKUP functions is the logical TRUE or FALSE that specifies whether you want Excel to find an exact or approximate match for the lookup_value in the table_array.
When you specify TRUE or omit the range_lookup argument in the VLOOKUP or HLOOKUP function, Excel finds an approximate match. When you specify FALSE as the range_lookup argument, Excel finds only exact matches.
Finding approximate matches pertains only when you’re looking up numeric entries (rather than text) in the first column or row of the vertical or horizontal Lookup table. When Excel doesn’t find an exact match in this Lookup column or row, it locates the next highest value that doesn’t exceed the lookup_value argument and then returns the value in the column or row designated by the col_index_num or row_index_num arguments.
When using the VLOOKUP and HLOOKUP functions, the text or numeric entries in the Lookup column or row (that is, the leftmost column of a vertical Lookup table or the top row of a horizontal Lookup table) must be unique. These entries must also be arranged or sorted in ascending order; that is, alphabetical order for text entries, and lowest-to-highest order for numeric entries.
The figure shows an example of using the VLOOKUP function to return either a 15% or 20% tip from a tip table, depending on the pretax total of the check. Cell F3 contains the VLOOKUP function:
=VLOOKUP(Pretax_Total,Tip_Table,IF(Tip_Percentage=0.15,2,3))
This formula returns the amount of the tip based on the tip percentage in cell F1 and the pretax amount of the check in cell F2.
To use this tip table, enter the percentage of the tip (15% or 20%) in cell F1 (named Tip_Percentage) and the amount of the check before tax in cell F2 (named Pretax_Total). Excel then looks up the value that you enter in the Pretax_Total cell in the first column of the Lookup table, which includes the cell range A2:C101 and is named Tip_Table.
Excel then moves down the values in the first column of Tip_Table until it finds a match, whereupon the program uses the col_index_num argument in the VLOOKUP function to determine which tip amount from that row of the table to return to cell F3.
If Excel finds that the value entered in the Pretax_Total cell ($16.50 in this example) doesn’t exactly match one of the values in the first column of Tip_Table, the program continues to search down the comparison range until it encounters the first value that exceeds the pretax total (17.00 in cell A19 in this example).
Excel then moves back up to the previous row in the table and returns the value in the column that matches the col_index_num argument of the VLOOKUP function. (This is because the optional range_lookup argument has been omitted from the function.)
Note that the tip table example uses an IF function to determine the col_index_num argument for the VLOOKUP function in cell F3.
The IF function determines the column number to be used in the tip table by matching the percentage entered in Tip_Percentage (cell F1) with 0.15. If they match, the function returns 2 as the col_index_num argument and the VLOOKUP function returns a value from the second column (the 15% column B) in the Tip_Table range.
Otherwise, the IF function returns 3 as the col_index_num argument and the VLOOKUP function returns a value from the third column (the 20% column C) in the Tip_Table range.
The following figure shows an example that uses the HLOOKUP function to look up the price of each bakery item stored in a separate price Lookup table and then to return that price to the Price/Doz column of the Daily Sales list. Cell F3 contains the original formula with the HLOOKUP function that is then copied down column F:
=HLOOKUP(item,Price_table,2,FALSE)
In this HLOOKUP function, the range name Item that’s given to the Item column in the range C3:C62 is defined as the lookup_value argument and the cell range name Price table that’s given to the cell range I1:M2 is the table_array argument.
The row_index_num argument is 2 because you want Excel to return the prices in the second row of the Prices Lookup table, and the optional range_lookup argument is FALSE because the item name in the Daily Sales list must match exactly the item name in the Prices Lookup table.
By having the HLOOKUP function use the Price table range to input the price per dozen for each bakery goods item in the Daily Sales list, you make it a very simple matter to update any of the sales in the list.
All you have to do is change its Price/Doz cost in this range, and the HLOOKUP function immediately updates the new price in the Daily Sales list wherever the item is sold.

Excel Glossary
active cell
The worksheet cell that contains the cell cursor. Each worksheet can have only one active cell.

Excel Glossary
AutoComplete
A feature that looks at the entries that you make in a worksheet column and automatically duplicates them in subsequent rows whenever you start a new entry that begins with the same letter or letters as an existing entry in that column.

Excel Glossary
AutoCorrect
A feature that alerts Excel 2007 to common typing errors and your own typing errors (that you specify) and tells the program how it should automatically fix them for you.

Excel Glossary
AutoFill
An Excel 2007 feature that quickly creates a series of entries based on the data you enter in one or two cells. AutoFill works with days of the week, months of the year, yearly quarters; consecutive series of numbers; and formulas. You also can add your own custom AutoFill series.

Excel Glossary
AutoFilter
A feature in Excel 2010 that enables you to temporarily hide everything in a table except the records you specifically want to view, based on criteria you specify.

Excel Glossary
Backstage view
A new feature in Excel 2010 — accessible from the green File tab — that enables you to manage files and to view the properties and stats about the workbook file you're editing.

Excel Glossary
cell
The intersection of a column and row in the worksheet.

Excel Glossary
cell address
The cell identifier, determined by its column letter(s) followed by the row number, as in cell A1, the very first cell of each worksheet at the intersection of column A and row 1.

Excel Glossary
cell cursor
The black border that surrounds the active cell in a worksheet.

Excel Glossary
clip art
Readymade drawings, illustrations, and photos offered by Microsoft for use in Microsoft Office applications.

Excel Glossary
Compatibility Checker
A utility in Excel 2007 and 2010 that you use to find potential compatibility issues if you plan to save an Excel workbook file in the older Excel 97–2003 file format.

Excel Glossary
current cell
The worksheet cell that contains the cell cursor. Each worksheet can have only one current cell.

Excel Glossary
data table
A range of cells in a worksheet in which you enter a series of possible values that Excel plugs into a formula so you can perform what-if analysis on the data.

Excel Glossary
dialog box
A rectangular window with settings and commands that appears when you click a dialog box launcher or certain other commands on the Ribbon.

Excel Glossary
dialog box launcher
A small icon in the lower-right corner of a group of command buttons on the Ribbon that you click to access a dialog box with additional related settings and commands.

Excel Glossary
function
A part of a formula that takes a number of specific arguments and then returns a single value based on those arguments.

Excel Glossary
gallery
A drop-down list of thumbnail selections that appears when you click certain command buttons on the Ribbon.

Excel Glossary
group
A section of a tab on the Excel 2007 Ribbon that organizes related command buttons into subtasks normally performed as part of the tab's larger core task. The name of a group appears at the bottom of the group, such as the Font group on the Home tab.

Excel Glossary
hyperlink
Specially formatted text that anyone can click to jump to Web sites, move to other cells or workbooks, or create an e-mail message.

Excel Glossary
keyboard shortcuts
A combination of keys that you can press to execute certain commands, as opposed to finding and clicking the commands' buttons on the Ribbon or elsewhere.

Excel Glossary
Live Preview
A feature in Excel 2007 that enables you to point to thumbnails on a drop-down gallery to see how a new font, font size, table style, or cell style would look on your selected data before you actually apply it.

Excel Glossary
macro
A series of commands or actions in Excel that are recorded and saved together in a file. You can run the macro whenever you need to perform the task.

Excel Glossary
Name box
The left-most section of the Formula bar that displays the address or name of the current cell.

Excel Glossary
pivot table
A special type of table unique to Excel 2007 that enables you to summarize large amounts of data and pivot or rearrange the table's data to display different summaries of the information it contains.

Excel Glossary
Ribbon
A new feature of the Excel 2007 interface that replaces the menus and toolbars of previous versions; appears at the top of the Excel window, just below the title bar.

Excel Glossary
ScreenTip
A small window that displays descriptive text when you point to but don't click a command on the Ribbon or other objects in a worksheet.

Excel Glossary
sheet tabs
Small tabs near the bottom of a worksheet that you click to move between the worksheets in a workbook. You can assign descriptive names to sheet tabs.

Excel Glossary
slicers
New graphic objects in Excel 2010 that enable you to quickly filter the contents of a PivotTable on more than one field.

Excel Glossary
SmartArt
A type of graphic object in Excel 2007 that gives you the ability to quickly and easily construct graphical lists and diagrams in the worksheet.

Excel Glossary
sparklines
Tiny graphs (miniature charts) that fit within a single cell in the worksheet, used to show basic trends in data.

Excel Glossary
Status bar
A horizontal bar that appears at the bottom of the Excel 2007 window and keeps you informed of Excel's current mode. In addition, you can use the Status bar to select a new worksheet view and to zoom in and out on the worksheet.

Excel Glossary
tabs
The various "pages" of Excel 2007's Ribbon interface that you click to display command buttons relating to the tab's name, such as Page Layout and Formulas.

Excel Glossary
template
A pre-designed worksheet that can be used as a basis for creating new worksheets.

Excel Glossary
WordArt
Stylized text objects that you use to add pizzazz and emphasis to headings and other text in Excel 2007 worksheets.

Excel Glossary
workbook
The basic file type that you create when you use Excel 2007. A new workbook consists of three worksheets by default.

Excel Glossary
worksheet
The main document that you work in when you enter data into cells within Excel 2007. A worksheet is stored in a workbook file.

Excel Glossary
worksheet area
The portion of an Excel 2007 worksheet in which you enter cell data and add objects such as charts and graphics.

Excel Glossary
XPS XML Paper Specification
A file format developed by Microsoft that enables people to open and print documents in XPS Reader without access to the original programs with which the documents were created (such as Excel).

Excel Glossary
Zoom slider
An object on the Status bar in Excel 2007 that enables you to increase the magnification in a worksheet or shrink it down to get an overall picture of the worksheet data.