Mais conteúdo relacionado Understanding Vlookup - Uses, Limitations, Workarounds1. The names, Excel, Word, Outlook and PowerPoint used in this document are Trademarks of Microsoft Corporation. All other trade or brand names are trademarks of their respective owners.
IMPORTANT: Avancer Learning Inc. presentations are provided AS-IS with no warranties. Altering, copying, and redistribution of this material is
prohibited. For full terms visit www.avancerinc.com/tou.html
Understanding
VLOOKUP
Usage, Limitations, Workarounds
© Avancer Learning Inc. 2016.
3. What is VLOOKUP?
Vertical Lookup
Look for something you know, Vertically down a column of data
Extracts more information related to the thing you know
Like You or Me
I know a Stock Symbol,
I want to know the Stock Price
I look up this information in the stock pages (By Looking Vertically)
© Avancer Learning Inc. 2016
Chances are, your eye did a “VLOOKUP”
4. What is VLOOKUP?
Vertical Lookup
Look for something you know, Vertically down a column of data
Extracts more information related to the thing you know
Like You or Me
I know a Stock Symbol,
I want to know the Stock Price
I look up this information in the stock pages (By Looking Vertically)
© Avancer Learning Inc. 2016
5. VLOOKUP Syntax (how you type it)
=VLOOKUP(lookup_value,table_array,Column_index_num,Range_lookup)
© Avancer Learning Inc. 2016
What you know Where to look.
Which block of
data should I
look in? (there
could be many
data sets in one
spreadsheet)
The thing you
KNOW should be
in the first column
“Lookup column”
Column number
that contains the
information we
want
It’s an “Index” number .
Means in relation to the
lookup column what is
its position, considering
lookup column as
number one.
Do you want a Range of
results (approximations)?
FALSE (No – I want an
exact match)
TRUE (Yes – an
approximate match will do)
TRUE is the default if you leave
out this part
Data has to be sorted in
Ascending order with the first
column as the sort key ONLY if
using TRUE
6. METHOD 1 - VLOOKUP with EXACT MATCH
=VLOOKUP(lookup_value,table_array,Column_index_num,Range_lookup)
© Avancer Learning Inc. 2016
7. METHOD 2 - VLOOKUP with APPROXIMATE MATCH
MUST – Sort the
Dataset in Ascending
order using Lookup
column as the Sort Key
MUST – Use TRUE as
the last argument or
omit it
Where would it be
used?
Tier-based lookups
Tax tables, Grading
tables, Commissions,
etc.
© Avancer Learning Inc. 2016
8. Not Available – The #NA error
Only when you use the EXACT Match method
What you are looking for is not found
Item not available in the data
Item available but misspelled in data or lookup_value
Item available as Text but lookup_value is Numeric (or vice versa)
Many solutions available
AFTER THE FACT (Handle the errors after they occur)
o IFERROR function – IF ANY error results, return an alternate value
o ISNA function used with IF function
o IFNA function (version 2013+)
BEFORE THE FACT (Ensure no errors by checking before Vlookup)
o Check if item exists before doing VLOOKUP (Many formulas to do this)
o Ensure user only looks for VALID items through drop-down lists
© Avancer Learning Inc. 2016
9. Handling the #NA error – After the fact
Using IFERROR (Careful – this one traps ALL errors)
=IFERROR(value,value_if_error)
=IFERROR(VLOOKUP(E18,C6:L15,7,FALSE),”Sorry there is an error”)
Using IFNA (if you have 2013+)
=IFNA(value,value_if_na)
=IFNA(VLOOKUP(E18,C6:L15,7,FALSE),”Sorry Not Found”)
Using ISNA and IF
=ISNA(Value)
=IF(Logical_test,Value_if_true,Value_if_false)
Something like this (massive formula)
o =IF(ISNA(VLOOKUP(E18,C6:L15,7,FALSE)),”Sorry Not Found”, VLOOKUP(E18,C6:L15,7,FALSE))
o Or in other words: IF the result of my Vlookup formula is NA, return “Sorry Not Found” (without quotes), else use my
Vlookup formula
© Avancer Learning Inc. 2016
10. Limitations of Vlookup -1
Lookup Column has to be the
first column
Anything left of lookup column
is unusable
Solution/Workaround*
Set up data appropriately
Or Move the lookup column to
far-left
Or select table_array to ensure
lookup column is leftmost and
ignore all else
Or use other functions like
INDEX with MATCH
© Avancer Learning Inc. 2016
Lookup column
* Other solutions exist as well
11. Limitations of Vlookup -2
Not forgiving of column
insertion/deletion
Column_index_number is a
constant
Will fail if you insert/delete a
column because the
column_index_number has
changed
Solution/Workaround*
Calculate the
Column_index_number
instead of hard coding it.
© Avancer Learning Inc. 2016
If I delete this column, Closing Price is no
longer the seventh column in my dataset
and the formula below will now get me the
price from the “Volume” column
* Other solutions exist as well
12. Limitations of Vlookup -more
Duplicates in the lookup column are ignored
Only data from the first matching record is returned
Even if other columns in the record are not same
One variable lookup only – Lookup value
Only nearest LOWER approximate lookup can be returned
Solution/Workaround*
Use other formulas – INDEX and MATCH in array formula, DGET with a
complex query for duplicates
Combine VLOOKUP and HLOOKUP or VLOOKUP and MATCH for two
variable lookups, or INDEX and MATCH
The MATCH function can return LOWER or HIGHER approximate lookups
© Avancer Learning Inc. 2016
* Other solutions exist as well
13. Creative uses of Vlookup
Interactive Business Models
Lookup an inputted variable and populate a business
model with the data looked up
Sensitivity and What-if analysis
Lookup a scenario variable in a table of scenarios and
populate a business model with the results
Variance and Gap analysis
Lookup Key Result Area actuals and planned values for the
evaluated item and compare
© Avancer Learning Inc. 2016