Error in VLOOKUP

K

Kris

I am trying to get Excel to look up what is in a column in a one worksheet
and find it in another worksheet and come back with what is in a different
column for the same row.

Example: I have one worksheet with names in one column (column I, file 1),
I want Excel to search in file 2 to find what is in column I row 2 and return
what is in column DH in file 2 for that name. I keep getting either a
reference error or an #NA error. Below is the formula I entered:

=VLOOKUP(I20, '[Excel Report MI.xls]Data Entry'!$A$13:$DH$68, 112, FALSE)

What am I doing wrong?
 
E

Eduardo

Hi Kris,
Two reasons for the #N/A, or you name doesn't exist in file2 or the name is
slightly different

If this helps please click yes, thanks
 
K

Kris

Nope, the name is exactly the same, spacing and everything. Still returning
the #NA reference.


Eduardo said:
Hi Kris,
Two reasons for the #N/A, or you name doesn't exist in file2 or the name is
slightly different

If this helps please click yes, thanks

Kris said:
I am trying to get Excel to look up what is in a column in a one worksheet
and find it in another worksheet and come back with what is in a different
column for the same row.

Example: I have one worksheet with names in one column (column I, file 1),
I want Excel to search in file 2 to find what is in column I row 2 and return
what is in column DH in file 2 for that name. I keep getting either a
reference error or an #NA error. Below is the formula I entered:

=VLOOKUP(I20, '[Excel Report MI.xls]Data Entry'!$A$13:$DH$68, 112, FALSE)

What am I doing wrong?
 
B

Bassman62

Kris,

VLOOKUP looks for a value in the leftmost column of the lookup table.
So if you're looking for a value in column I in file 2 your formula should
be
=VLOOKUP(I20, '[Excel Report MI.xls]Data Entry'!$I$13:$DH$68, 104, FALSE)
Hope this helps.
 
H

Harlan Grove

Kris said:
Nope, the name is exactly the same, spacing and everything.  Still returning
the #NA reference.
....

Then if, say, cell '[Excel Report MI.xls]Data Entry'!A35 looked the
same as cell I20 in the active workbook/worksheet, what does the
formula

='[Excel Report MI.xls]Data Entry'!A35=I20

return? If it returns FALSE, what do the formulas

=LEN('[Excel Report MI.xls]Data Entry'!A35)

and

=LEN(I20)

return? If they return different numbers, then what does the formula

=TRIM('[Excel Report MI.xls]Data Entry'!A35)=TRIM(I20)

return? If this last formula returns TRUE, then the cell for which the
LEN formulas above returned the larger number almost certainly does
contain trailing spaces which you wouldn't be able to see unless you
edit that cell and move the insertion point (vertical bar cursor) to
the end of the cell's contents.

If the first formula above returns TRUE but your formula

=VLOOKUP(I20,'[Excel Report MI.xls]Data Entry'!$A$13:$DH$68,112,FALSE)

returns #N/A, then you may have found a true bug in Excel unless your
I20 name contains certain special characters. In which case you'd need
to show us the troublesome I20 value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top