Vlookup not working

shatibi

New Member
Joined
Jun 21, 2010
Messages
20
Hello,

I'm trying to use the vlookup function. I've got a sheet in the workbook that lists all the item numbers and their corresponding square footages.

I'm trying to look up data on another sheet based on that table. (but I did try putting the table on the same sheet, in case that was it and it didn't help.)

Sometimes it pulls the correct answer and sometimes it doesn't. On the sheet with the list, the table range is B2:C38. On the table I'm trying to use the vlookup function, this is the formula I'm using:

if(d5="","",vlookup(d5,Item!B$2:c$38,2))

Please help! I already made sure every cell is set to number on all sheets, that didn't help. I even tried shortening the digit number, b/c the item number is fairly long (e.g. 10007171), but that changed which cells were messing up, but not the main problem itself.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
No, that wasn't it. I tried that already, but I think I figured it out. It looks like I needed to sort the item numbers into ascending order. Once I did that, the problem went away.

Who knew? :) But thank you! :)
 
Upvote 0
I rarely use vlookup any more, partly due to the problem you encountered. Try substituting index/match . . . no need to sort AND you aren't constrained to the lookup in leftmost column like you are w/ vlookup.
 
Upvote 0
=index(Source!$A:$X,match(Summary!B10,Source!$M:$M,false),1)

=index(Source!$A:$X single column or range that holds data you want returned,match(Summary!B10 cell with item being "looked up",Source!$M:$M column that holds list of lookups items,false first value that matches exactly),1 number of the column number in $A:$X range that holds the data we want returned i.e. column A, so this is example of finding an item in column M & returning what is in column A, something you can't do w/ vlookup because col M would have to be the leftmost column in our range)
 
Upvote 0
If your looking up a value thats an exact match within your table, then the answer your retrieving can be sorted any way. it only neets sorted in ascending order if your looking up a number and the answer isn't in the lookup table and you want an approximate match for the answer

Excel Workbook
FG
18march888
19june458
20may235
21august1253
22Lookup ValueAnswer
23june458
Sheet2
 
Upvote 0

Forum statistics

Threads
1,222,312
Messages
6,165,275
Members
451,949
Latest member
bovacik

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