Incompatible: Dynamic Named Ranges and Indirect Data validation?

jbeaucaire

Well-known Member
Joined
May 8, 2002
Messages
6,012
This works:
1) INDIRECT() data validation and flat named ranges
2) Direct data validation and dynamic named ranges

This doesn't work:
3) INDIRECT() data validation and dynamic named ranges

Any magic wands out there on this? I could really use some way get #3 working in some form without VBA.

I played around with CHOOSE(), but not only couldn't get it to work as a Data Validation formula, I'm not sure it's appropriate since the # of lists will probably exceed 29.

=============
Unnecessary background:

I have an ordering sheet with a growing number of "option lists".

1) The product lookup table includes a column where we designate the correct options list to use.

2) On the ordering sheet, these lists populate themselves into a drop box in column C based on the product chosen in column A. This is done via an INDIRECT() Data Validation formula that looks like this:

=INDIRECT(INDEX(OptionLists,MATCH($A12,Codes,0)))

3) The lists themselves are maintained on another sheet. We have 12 product lines to define option lists for, and after completing only 1 product line, we're already up to 15 lists. Not sure, but I believe the final number of option lists will number 40-50.

4) Each list, once completed, is given a flat Named Range matching the Option List name designated in the product lookup table.

Everything is working fine up to here.


GOAL: Be able to convert the flat named ranges into Dynamic Named Ranges so the lists update themselves as the girl adds/deletes items from any of the lists.

PROBLEM: When I change an option list from a flat named range to a dynamic named range, the INDIRECT() formula above stops working for that list. It's as if the list doesn't exist.

The dynamic name range formula I'm using is:
=INDEX(Options!$D:$D, 2):INDEX(Options!$D:$D, COUNTIF(Options!$D:$D,">"""))

(crosspost and simple sample sheet)
 
Last edited:

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
It would make no difference which definition is used. When the results is an array (that's the case with dynamic named ranges), INDIRECT is not getting a string that stands for a range object.
 
Upvote 0
A very interesting workaround with a nested IF() and CHOOSE() data validation formula provides a good option.

http://www.excelforum.com/excel-gen...data-validation-incompatible.html#post2170286

Unfortunately, this solution results in MORE work for a non-Excel-savvy girl, and the goal was really to come up with a way to have dynamic name ranges and all she would need to do is add/subtract items from the lists and add/delete new lists. The IF/CHOOSE thing requires the creation of an additional list and the DV formulas would have to be manually edited everytime a new list was added.

But, at least i know there IS a workaround that I can utilize in my own stuff in the future.
 
Upvote 0
A very interesting workaround with a nested IF() and CHOOSE() data validation formula provides a good option.

Dynamic Named Ranges and Indirect Data validation INCOMPATIBLE?

Unfortunately, this solution results in MORE work for a non-Excel-savvy girl, and the goal was really to come up with a way to have dynamic name ranges and all she would need to do is add/subtract items from the lists and add/delete new lists. The IF/CHOOSE thing requires the creation of an additional list and the DV formulas would have to be manually edited everytime a new list was added.

But, at least i know there IS a workaround that I can utilize in my own stuff in the future.

Thanks for this. I know it was a while ago, but it helped!
 
Upvote 0
An easier solution (in my opinion) is to create a defined name that uses EVALUATE instead of INDIRECT (the syntax is the same) because that will work with a dynamic named range.
 
Upvote 0
An easier solution (in my opinion) is to create a defined name that uses EVALUATE instead of INDIRECT (the syntax is the same) because that will work with a dynamic named range.

Yep. It would be greatly appreciated if Excel would include a function EVAL in a native form, similar in behavior to Longre's EVAL in his morefunc.
 
Upvote 0
Very true! We can add that to the (long) wish list! :)
 
Upvote 0

Forum statistics

Threads
1,215,325
Messages
6,124,252
Members
449,149
Latest member
mwdbActuary

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