Dependent Data Validation

Andikins

New Member
Joined
Sep 23, 2005
Messages
6
Hi All

Apologies if this has already been answered before.

My issue is as follows:

My first column is say "Country" and my second is "State".
The user will input multiple rows where the country can vary by row

For a row where Country = 'United States' I want to use data validation on the State field to restrict the user input to a list of US states

For a row were Country <> 'United States' I want the State field to be free input with no restrictions.

Is this possible using Excel Data Validation? I realise I could probably do something via the worksheet change event macro but would much prefer not to.

Thanks in advance...
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
So just to clarify my plan is to do something like:

I have a list of all US states as a named range called "US_States".

Then if country was in column A I would do a validation with a formula something along the lines of:

=IF(a2="United States",US_States,XXXX)

the issue being that I am not sure what to put for XXXX to allow the user to input whatever they want when the country in not US.
 
Upvote 0
Why not defined named range called USA?
For Instance, H2:H51


Use Indirect to call range then
Data validation

List

Source
Indirect(A2)
The indirect formula assumes A1 country.

Does this help?

Biz
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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