VLOOKUP Troubleshooting Tips: VLOOKUP (Lookup - Value, Table - Array, Col - Index - Num, (Range - Lookup) )
VLOOKUP Troubleshooting Tips: VLOOKUP (Lookup - Value, Table - Array, Col - Index - Num, (Range - Lookup) )
VLOOKUP Troubleshooting Tips: VLOOKUP (Lookup - Value, Table - Array, Col - Index - Num, (Range - Lookup) )
Unexpected Does this value exist in the left- Are you using a relative refer- Are you pointing to the Have you swapped the
most column of your lookup ence (e.g., A2:G145) when an correct column in the lookup arguments? Remember, use
results? table? If not, and its impractical absolute reference (e.g., table? To figure out what this FALSE for an exact matche.g.,
to move the column, you must $A$2:$G$145) is necessary? number should be, count over when youre looking up a proper
use another solution, such as This is important when youre to the right from the first col- name or specific product code.
INDEX and MATCH. Note that the copying the VLOOKUP formula umn in your lookup table. Use TRUE to find the closest
column's physical position in the to other cells. In this case, you Count that first column as 1. match to the lookup value if an
worksheet doesnt matter. If your typically want to lock the exact match doesnt existe.g.,
lookup table starts at column R lookup table to prevent mis- Be careful here. You wont when youre mapping test scores
and ends at column T, column R leading results. To quickly necessarily see an error if to a table of letter grades or in-
is the leftmost column. switch between reference youre off by a column, but come to a table of tax rates.
types, select the range you Excel may return the wrong
Does the format of the lookup If youre using TRUE, are the
entered for this argument, and datae.g., March sales num-
value match the format of the values in the first column of your
then press F4. Or, better yet, bers instead of April numbers.
matching value in the lookup lookup table sorted in ascending
use a defined name instead of
table? Errors often occur when Do you see the #REF! error? If (A to Z) order? If not, you may
a range; names use absolute
one of these values is not so, make sure the number you see unexpected results. (This
cell references by default.
formatted correctly. specify for this argument isnt sorting isnt required for FALSE.)
greater than the number of
If youre using text, did you re- Is your lookup table on a If youre using FALSE, do you see
columns in your lookup table.
member to put quotation marks different sheet or workbook? a #N/A error? If so, Excel cant
around that text? If youre typing If so, is it referenced correctly find a match. This may be be-
text directly (vs. using a cell refer- in this argument? Double- cause one doesnt exist. Or, a
ence such as A2), you must use check the sheet names, espe- match may exist, but Excel
quotation marks. cially if youre switching back doesnt interpret it as such
and forth between sheets as because of formatting problems
youre building the formula. or other issues.
The first column or lookup value These spaces often occur when you bring data In the following lookup table, there are extra spaces before the page names in column
contains unnecessary leading or into Excel from databases or other external A. To remove these spaces, insert a temporary column next to column A, type =TRIM
trailing spaces, or extra spaces sources. (A2) in cell B2, and then press ENTER to remove the spaces. Then, copy the formula to
between words. You can remove the spaces manually or use the rest of the cells in column B.
the find and replace feature to do it. You can
also use the TRIM function, which removes
extra spaces from text, except for single spac-
es between words.
After the spaces are gone, paste the clean data from column B over the data in
column A, taking care to copy the values, not the underlying formula. Finally, delete
column B since it is no longer needed.
The first column or lookup value These characters sometimes show up when In the following example, SUBSTITUTE replaces the errant CHAR(160) character with
contains carriage returns, you copy or import data into Excel from the an empty space, CLEAN removes nonprinting characters, and TRIM removes extra
linefeeds, nonbreaking spaces, or web or other external sources. spaces, if they exist.
other special characters that are TRIM wont work here, at least not on its own. =TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160)," ")))
embedded into the text. Instead, you can use CLEAN or SUBSTITUTE If you need more information about any of the functions mentioned here, open Excel,
or a combination of these functions to get press F1, and then search for the function name in Help.
rid of the characters.
Use similar formulas to show an empty cell, or to show a zero in the cell: