PDA

View Full Version : Solved: Dependent Validation Lists



tools
04-25-2008, 05:03 AM
Hi all

I am having two data validation list in my sheet which are created dynamically.

Now I want to change the value of one list depending on the value of the another list.

For eg.

list1 has names of fruits list2 has color of these fruits
apple red
orange orange
banana yellow
watermelon green

If the user selects banana from list1 then the value in the next cell should be yellow and it should work the other way round also.

I have attached an excel sheet.

The data in the validations list is obtained dynamically.
Locations of the lists would be available to me at run time.
I want to do this through vba.

Thanks and Regards

Simon Lloyd
04-25-2008, 01:00 PM
I have changed your validation and entered some dynamic named ranges, then in the worksheet change event for the "Protect action" sheet i have added a little code to achieve what you want.

tools
04-28-2008, 05:50 AM
Thanks a lot Simon