Selective Validation Source List Execution

coggo

New Member
Joined
Jun 3, 2002
Messages
21
G'day,

I would like to set-up two cells under validation (with in-cell drop-down menus), where one is dependent upon the other's cell contents. I was going to make the source of the validation a list stored in other cells in my spreadsheet. To give you a better of understanding of what I am trying to achieve, in terms of validation dependency, I'll give an example. Say cell A1 has a validation list elsewhere on the spreadsheet that contains the entries "fruit, vegetables, take-away". Now depending on which of these is selected in the first cell A1, I would like to have the second cell, A2, choose a source list within the same sheet. For example if in A1, "vegetables" was entered, then a source list would be selected for A2 that may contain "potato, celery, carrot". I presume this requires some sought of IF statement in a macro, depending on the cell contents of A1. However, I guess my question is, how can I have this macro executed to set the validation source list for A2, once an entry (or choice) has been made in A1? Or is it possible do this by giving the cell's source range as a named range, and make it dynamic by inserting IF statements into its declaration in the macro?

If anyone can offer me any assistance I would greatly appreciate it!

Thanks in advance!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
i actually set a cell range as if statements. if a1 said vege then b2 said tomato, if a1 said car then b2 said farari.

Then i used the reference to this if list in my data validation!
(no named ranges involved)
 
Upvote 0
Brian's correct Congo... this post will tell you how to do it with about a 5 minute set-up without a macro.
 
Upvote 0
Coggo,
I had a similar one last year from a Tammy. I found it easier the email her an example than explain. I still have a copy of the file if you would like it.
Richard
 
Upvote 0
Back Again.....and working!

Thanks very much to everyone who replied, it is a very quick solution indeed!

Thanks again!

Coggo
 
Upvote 0

Forum statistics

Threads
1,221,645
Messages
6,161,044
Members
451,682
Latest member
ogoreo

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