Microsoft Office Tutorials and References
In Depth Information
Looking It Up
HLOOKUP takes four arguments; the first three are required:
The value to find in the top row of the table: This can be text or a
number.
The address of the table itself: This is either a range address or a
named range.
The row offset from the top row: This is not a fixed row number but
rather the number of rows relative from the top row.
A true or false value: If true (or omitted), a partial match is acceptable
for Step 1. If false, only an exact match is allowed.
Figure 14-10 shows how HLOOKUP pulls values from a table and displays
them elsewhere in the worksheet. This function is quite useful if you need to
print a report with a dedicated print area and must include some, but not all,
of the data in the table. This example uses the HLOOKUP function to extract
the desired data and display it for printing.
Why not just use a cell reference to the table cell that contains the desired
data? A cell reference will not return the correct data if the table is moved or
if one or more columns are added. With HLOOKUP and VLOOKUP you know
you’ll always get data from the correct column or row.
Figure 14-10:
Using
HLOOKUP to
locate data
in a table.
In Figure 14-10 the table is the range B20:H21, which has been assigned the
name Daily_Results. Each cell in the range C6:C12 uses HLOOKUP to locate a
specific value in the table. For example, cell C6 has this formula:
HLOOKUP(“Monday”,Daily_Results,2,FALSE)
Search JabSto ::




Custom Search