VLOOKUP Returns #NA when data is present

i8ur4re

Board Regular
Joined
Mar 1, 2015
Messages
97
I cant wrap my head around this error, I have 2 excel sheets, I am using VLOOKUP to add new pricing from the new sheet to the old sheet, I have triple checked a couple of numbers and noticed some exists on both sheets. Yet I it inputs #NA in that cell, I have cross checked a few numbers and saw that the data is visibly on both sheets. What am i doing wrong?

Formula: =VLOOKUP(D2,[Book1]Sheet1!$A$2:$E$139,5,FALSE)
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
In that case the one on the new sheet is text not a number
 
Upvote 0
In that case the one on the new sheet is text not a number

I changed it to numbers, that didnt seem to work, I did copy/pate into a notepad and pasted them back into that column and that seemed to change them to numbers, but i am still seeing NA on all the values.
 
Last edited:
Upvote 0
Upvote 0

I do not see 220175 or any of the 3xxxxx product numbers (D2:D15) in A2:A139 of the "New Prices" worksheet.

I suspect that is true in many/most/all cases.

I do not see 714116 in both worksheets. I see 714116 in "Old Prices", but 714166 in "New Prices".

Use Data > Filter to spot-check product numbers.

-----

Change the range in the VLOOKUP to use absolute cell references, to wit:

=VLOOKUP(D2,'New prices'!$A$2:$I$139,9,FALSE)

Otherwise, your range is changing to A3:A140, A4:A141, etc as you copy the formula down the column.

That might explain why some product numbers cannot be found in both worksheets.

-----

FYI, you can use $I$139 for both VLOOKUPs, instead of $E$139, even though you return the value from relative column 5. IMHO, it just makes things easier.

To that end, you can also change D2 to $D2. That allows you to copy the formula from column K to column L. It is less error-prone.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top