Ah, ok. That is because you can't use Indirect with a dynamic named range. The named range is working, you can test that by doing:
That will return 3, which is correct. There are 3 rows in the named range Arizona. However, you can't do:
Because "Arizona" is a dynamic named range which is defined with a formula.
Basically, what you'll have to do is used a data validation formula and put all of the information on the same sheet. The information columns can be hidden if desired.
Attached is a modified version of your example workbook.
There is now only 1 sheet, Sheet1.
Row 1 is used as a header row so data starts in row 2.
Starting in Column E is the list of states with their cities below.
I created a dynamic named range formula named list_States which is defined with the following formula:
Now, in cell A2 and copied down is this data validation list formula. This works because we're not using Indirect, we're using the named range directly:
Lastly, in cell B2 and copied down is this data validation list formula:
The cell $DA$1 is used only as a blank cell. So if nothing has been chosen for the state, the City drop-down list is blank. The Offset and subsequent functions after that will get the correct city list based on the chose state. Note this only works if the data is on the same sheet as the data validation drop-down list as stated earlier.
Bookmarks