Hi all,
Ok I'm pretty new to VB in Excel. I currently have Excel 2003 (I know thats well old).
Right my question is how can I get an value to be automatically inserted into a coloumn after I select an entry froma data validation drop down options?
Let me clarify it further. Suppose I have created a data validation menu for a range of cells, say the menu consists of the following:
Apple
Banana
Pear
Orange
...and say that each fruit has a specific quantity, for example:
Apple 100
Banana 50
Pear 300
Orange 400
What I'd like to do is, when I select a fruit from the data validation menu the, ie Pear, than the relevant quantity (ie 300) is automaticaly inserted/diaplayed in the 'next' coloumn.
Hope this is clearer.
Thanks.
If you create a table of values somewhere that looks like your above second table, then you can use VLOOKUP
e.g.
=IF(A2="","",VLOOKUP(A2,$X$1:$Y$10,2,FALSE))
where A2 contains your drop down and X1:Y10 contains your table of fruits and associated values.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks