VLOOKUP based on drop down list

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,199
Office Version
  1. 2007
Platform
  1. Windows
Hi,
I need to select a value from my drop down list and the code will look at three values in a database then put them in three next to where the drop down list is.
Here is the info for you.

Worksheet is called TEST
Drop down list is in column B
Cells awaiting data are in column C, D, E
Table database is on same worksheet & range is N4:Q21
Find name in column N
First value to look at is in column O
Second value to look at is in column P
Third column value to look at is in column Q

So It would work like this,
Cell B5 select name from drop down list.
Look for that name in column N of table database.
Once found get value from column O,P & Q
Then put that value in Row 5 column C,D & E
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
vCDE
1
2
3
4
5=VLOOKUP($B$5,$N$4:$Q$21,2,0)=VLOOKUP($B$5,$N$4:$Q$21,3,0)=VLOOKUP($B$5,$N$4:$Q$21,4,0)
 
Upvote 0
Hi,
Yes that works.

Before i select from the drop down list colmns C,D & E show #N/A until i make a drop down selection.
Need to be able to show the cell is blank without the #N/A

Im not sure the correct way to write it but did the following & now i see #NA ME?

Code:
=IFERROR(VLOOKUP($B$5,$N$4:$Q$21,3,FALSE),””)
 
Upvote 0
Hi,
This gives me a blank cell but is it correct & ok to use ?

Code:
=IFERROR(VLOOKUP(B5,$N$4:$Q$21,2,0),"")
 
Upvote 0
If it works, then why wouldn't it be ok. Afterall, it is your spreadsheet and you are the one that needs to be happy.
 
Upvote 0

Forum statistics

Threads
1,213,504
Messages
6,114,016
Members
448,543
Latest member
MartinLarkin

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