1 use a cell value as a key to a table to find and return a specific element to another cell or use...
TRANSCRIPT
Using the VLookup Function
1
Use a cell value as a KEY to a table to find and return a
specific element to another cell or use in a calculation.
Lookup Tables and Functions
2
Lookup Tables and Functions
A lookup table is a table that organizes data based on different categories, in order to retrieve a value from the data
The category for the lookup table, called compare values or Key is located in the first column (VLookUp) or row (HLookUp) of the table.
To retrieve a particular value from the lookup table, a lookup value (the value you are trying to find) needs to match one of the compare values
3
Lookup Table ExampleFortune Cookie Sentence Generator
4
TABLE LOOK-UP Example
Noun Verb Adverb Prposition3 6 5 5
Carol talked mindlessly to his friend
Carol talked mindlessly to his friend
Noun Verb Adverb Preposition1Bob 1ran 1quickly 1Toward home2The Chicken 2walked 2carelessly 2to school3Carol 3skipped 3slowly 3from the library4Sue 4drove 4quietly 4Behind the store5Alice 5jumped 5mindlessly 5to his friend
6talked
Lookup Table
5
The Actual values and cell locations used in the example are different than what is shown here.
Lookup Tables and Functions
Two types of lookup functions VLOOKUP
VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
HLOOKUP HLOOKUP(lookup_value, table_array, row_index_num, [range
lookup]
range_lookup: Optional - True or False. If Blank or TRUE, it looks for an Approximate Match – KEYS
MUST BE IN ASCENDING SEQUENCE
If the KEY is not found, it returns the value of the prior key
If FALSE, The Key must be an Exact Match and the Keys DO NOT need to be in order..
6
Lookup Tables and Functions Lookup functions can be used to find
exact matches and approximate matches
Exact match looks for an exact match between the lookup value and a corresponding value in the lookup table
Approximate match looks for a correlation between the lookup value and a range of values
7
Lookup Tables and Functions When using an approximate match
lookup (TRUE), the compare value (Key) in a lookup table must be sorted by alphabetical order (if text) or low-to-high order (if numeric)
Excel searches the first column (vlookup) or row (Hlookup) of the lookup table (compare values) until it locates the largest value that is still less than the key.
8
Exercise VlookUp Payroll Record Part-3 Use the VLOOKUP function to find an exact match for
a code. Vlookup is better than a Nested If when you have
many possible values. Management is so happy with the work you have done
on the Payroll Record spreadsheet, they want to add a lookup to an Employee Information Data Table.
In addition, since the Employee name is used in other processes, they want to use a table that uses the ID to extract the Employee Name, Department , Pay Rate, Deduction code and Health Insurance Amount. The Employee Table will also contain another lookup to a Health Insurance Code Value Table.
9