PDA

View Full Version : Cell values based on dropdownlist selection



iWantToLearn
08-30-2014, 06:49 PM
Hi,

I dont know if i need vba to do what i am trying to do but i have been searching on the web for hours and cant find anything usefull.
(my english is still needs some practice but i hope you can catch what i am trying to say :))
What i want to do is:

I have a dropdown list assigned to all cells between A1-A10. So the first thing i want to do is if i select an item in the dropdown list lets say its in cell A1, i want remove that item from the dropdown list (or make it unselectable) so one item can be selected only once in the list . (letme give you an example, lets say the items of the list are X, Y, Z so if you choose X in Cell A1, then you cant choose X in the rest of the cells that have the same dropdown list assigned to.
the other thing i want is lets say i select an item in cell A1 and i want to have a specific value or function in cells B1, C2 based on the selected item. For example lets say if i choose "sum" in the dropdown list i want cell B1 to sum some numbers if i chose "multiplication" i want cell B1 to multiplicate some numbers.


Can you advice me how can i do it? or where should i look for the solution?
Thank you so much for any advices!

br,
Joco

SamT
08-30-2014, 07:43 PM
Oh, you definitely need to use VBA to do that.

Since VBA is only a way to implement your own step-by-step logic as to what has to happen, you job is to think about that logic, then we can help you implement it.

snb
08-31-2014, 05:15 AM
What you want is dependent validation.
The best advice to give is to post a sample workbook here.
The next one to have a look over here: http://www.snb-vba.eu/VBA_Afhankelijke_validatie_en.html

holycow
08-31-2014, 07:08 AM
Please see attached formula approach to the first part of your question

iWantToLearn
08-31-2014, 02:58 PM
Thanks for the advices i will have a look :)

holycow
09-16-2014, 05:04 AM
It would be interesting to know how you went with this?