Well, I learnt a useful bit of VBA code (Debug.Print) and found that the issue is not a difference of using named ranges vs tables, but limitations in the code to deal with complex data validation list formulas.
On such formulas, the code breaks at this point:
On the simple code used for taking the contents of the cell to the left as the name of a range, .ListFillRange ends up as an absolute range.
With the formulas I've been using for tables, however, the nm.RefersToRange.Parent.Name causes an issue.
A value of nm from a named range (with substitutes to create the name) that works at this point is
A table one that breaks has a value of nm at this point:
The main difference between them is the R1C1 indirect, but having embedded named formulas with also break it.
As a hack, the following validation list formula will work with the code for tables.
So, instead using an A1 reference instead of using R1C1 indirect, it is possible to use tables instead of named ranges.
For me, the advantage is that it is easier to maintain a table, rather than named ranges.
A more eloquent solution would be to modify the code so that it also bottoms out to an absolute range.
Bookmarks