dependent data from dropdown

rpeas

New Member
Joined
Mar 10, 2010
Messages
2
easy one im sure, but i cant work it out! :confused::confused::confused:

If cell A had a working dropdown menu, how does one make Cell B apply data based on that choice: i.e

if user chooses apple from cell one, the quantity of apple in cell 2 ALWAYS 6
if user chooses orange from cell one, the quantity of orange in cell 2 is 7

is there a technical name for this?

many thanks!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
hi rs2k,

i applied the VLOOKUP command, but it appears not to have worked because the cell it is linked to is not constant. i.e the drop down menu has several variables, so it gives me a REF error.

must be a way around this though. any other ideas?

r.
 
Upvote 0
If you make a list, say Y1=Apple Z1=6, Y2=Orange Z2=7, Y3=Pear Z3=8 etc... you get the picture, then the vlookup will work, so presuming the list is in A1 the formula in B1 is;

Code:
=VLOOKUP(A1,Y1:Z3,2,0)

You could always use a ws to store your list and have it hidden,

HTH
Colin
 
Upvote 0
lets say G11:G13 = apples oranges pears
H11: H13 = 6 7 8
your drop down in A1 -- in B1 =index(H11:H13,MATCH(A1,G11:G13,0))
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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