Validation with varying lists

J

Jay

How do I set up data validation for a cell such that it
picks a different list based on the value in a different
cell?

For example, I have a cell which I have provided options
for country to be picked (USA, Canada, France, Germany
etc.). Based on the value picked from this cell, I want to
automatically change the list provided in another cell
with cities. So if I pick USA in the first cell, the list
becomes (New York, Chicago, Los Angeles, etc.), while if I
pick Germany, the list in the same cell becomes (Hamburg,
Berlin, Dusseldorf etc.). I have a table with cities by
country available in a table.

I would greatly appreciate if anybody could help.

Thanks.
Jay
 
P

Peo Sjoblom

Name the different lists with their country names so if USA's items are in
Sheet2!A2:A50 then the range Sheet2!A2:A50 is named USA.
Now in the first validation you have a list of country names, assume you
have that in A2, then for the second validation refer to A2 under allow>list
and =INDIRECT($A$2) that way when you select a country, the second
validation will pick among the items from that country's list.. Debra
Dalgleish has some examples and a better explanation here

http://www.contextures.com/xlDataVal02.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top