Vlookup and Drop down lists

KeviW

New Member
Joined
Sep 7, 2014
Messages
2
Hi ,

I have made a drop down list of materials for a job card in excel . I would like excel to be able to get the product code for that material in a database on a seperate sheet . I have tried to use the vlookup function to do this but keep getting a #n/a error . I think this is due to the fact that looking at the value from a drop down list .

Is there a way that I can get vlookup to work with a drop down list .

Thanks
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi ,

I have made a drop down list of materials for a job card in excel . I would like excel to be able to get the product code for that material in a database on a seperate sheet . I have tried to use the vlookup function to do this but keep getting a #n/a error . I think this is due to the fact that looking at the value from a drop down list .

Is there a way that I can get vlookup to work with a drop down list .

Thanks


What you're doing should work ok. Make sure the values in your dropdown list are typed exactly the same as those in your "lookup" table.
 
Upvote 0
Hi KeviW, welcome to the forum.

I'm pretty sure it is not the drop down per say. You will get the #N/A if there is no match.

Maybe post your formula and also check that the values in the drop down truly are identical to the lookup values in the table array.

Regards,
Howard
 
Upvote 0
Thanks for the replies . Basicly on sheet 2 I have columns . Column A is the product code and B is the description . On Sheet A the product codes will be in column B and the descriptions in C . The products on sheet 2 have been named "materials" and then have used the data validator to make a drop down list on sheet 1 cell D38 with the "materials" . I then have this formula in B38 to find the relevent code . =VLOOKUP(D38,Sheet2!A2:B11,1)
 
Upvote 0
Are the product codes only numbers? The issue might be that your dropdown list is formatted as text and your database is stored as numbers (or the opposite).
To a VLOOKUP, "1234" does not equal 1234.
 
Upvote 0

Forum statistics

Threads
1,222,032
Messages
6,163,506
Members
451,839
Latest member
HonestZed

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