# EXCEL PRO

C F O E XC E L P R O | M A R C H 2 0 1 2 • C F O . C O M
B J is a regular contribu-
tor to CFO and a Microsoft MVP—
a distinction held by only 3,000
professionals worldwide—Bill “MrExcel”
Jelen is CFO Excel Pro’s resident expert and
chief writer. He has authored 33 books on
Excel, is an internationally renowned
consultant and trainer, and is host of
MrExcel.com
1
LEARNING PRO
E X C E L
T R A I N I N G F O R F I N A N C E P R O F E S S I O N A L S
Voiurv 1 No. 1o Bo×us
M»vcn z6, zo1z
BASIC VLOOKUP (Spicy Scale: )
= VLOOKUP (A2,\$D\$2: \$F\$29,3,False)
(CFO326Fig1.jpg) Your basic lookup – it
looks for an exact match in the first column
of the table and returns column F for the first
match found. If a match isn’t found, you get
the dreaded #N/A error. When you get the
#N/A, treat with healthy doses of =IFER-
ROR() in Excel 2007+ or =IF(ISNA()) in Excel
2003-. (Note: By “Excel 2007+” I mean Ex-
cel or newer. By “Excel 2003-“, I mean “Excel
2003 or earlier”)
RANGE LOOKUP (Spicy Scale: )
=VLOOKUP( A2, \$D\$2: \$E\$6, 2, Tr ue)
(CFO326Fig2.jpg) Mostly used by scientists,
the approximate match of lookup can also
come in handy for commission accountants
or tax commissioners. Note that the “,True” in
the formula can be omitted, particularly if you
dislike your co-workers. Tip: This is the only
time that the lookup table must be sorted.
LOOKUP LEFT (Spicy Scale: )
=INDEX(\$D\$2:\$D\$99,MATCH(A2,\$E\$2:
\$E\$29,0))
(CFO326Fig3.jpg) This is rated 3 on the
“spicy” scale because most people have nev-
er encountered INDEX nor MATCH. How-
ever, it is easy to understand once you know
that MATCH works like VLOOKUP but re-
turns the position of the item within the look-
up table. No one really would care *where*
the matching item is found, but the INDEX
function cares. The INDEX function is built
to work with MATCH. The Index function
will return the Nth item from a range of an-
swers. The above formula uses MATCH to
find where the lookup value is in E, then re-
turns the identical position from D. Why not
just copy D to the right of E? Because then it
wouldn’t be “a triple spice,” now would it?
GET THE FINAL MATCH
(Spicy Scale: )
=I NDEX( \$F\$2: \$F\$99, MATCH( 2, I F( \$
D\$2:\$D\$99=A2,1,NA()),1)) followed by
Ctrl+Shift+Enter
(CFO326Fig4.jpg) Trust me, it works like
a charm, but it would take many more pages
to explain why it works. In short, when you
ask the approximate version of MATCH to
look for a really large number and it cannot
find anything that large, it returns the position
of the last numeric value. That IF statement
makes sure that the cells with the lookup value
return a 1 and the non-matches return an er-
ror. In the resulting array of 1’s and #N/A’s, 2
is a really large number. If you don’t finish this
recipe off by holding down Ctrl+Shift while
pressing Enter, you will get an #N/A error.
Catch more VLOOKUP tips like these,
plus many more during a special VLOOK-
UP Week webcast, this Thursday, March 29,
Community page.
The VLOOKUP Spicy Scale
March 25-31, 2012 is VLOOKUP Week across the web.
To celebrate VLOOKUP Week, CFO contributor Bill Jelen
checks in with four progressively harder forms of lookup.
BONUS FOR
CFO LEARNING PRO
SUBSCRIBERS
Special VLOOKUP