Hoping someone on here knows the answer, it's probably something simple I'm overlooking.
Currently we have a sheet with pre-defined values in columns such as:
A
1 MyValueA
2 MyValueB
3 MyValueC
Which I refer to as a named set:
MyNamedSet: =Lists!$A$2:$A$3
And pull into an array in my VB code:
MyArray = Evaluate(Names("MyNamedSet").RefersTo)
Thus yielding the following array:
MyArray (1,1) = MyValueA
MyArray (1,2) = MyValueB
MyArray (1,3) = MyValueC
What I would like to do with this named set is make it to where it allows the user to add additional rows to the Lists worksheet which are then pulled into the array at macro runtime.
To this end, I changed the Named item to be
MyNamedSet: =OFFSET(Lists!$A$1,0,0,COUNTA(Lists!$A:$A),1)
My hope was that this would automatically pull in the entire set of values from the "A" column, but instead it simple returns MyArray = "=OFFSET(Lists!$A$1,0,0,COUNTA(Lists!$A:$A),1)".
Any ideas as to what I am doing wrong? I am trying to elimitate the need for the named range to be updated every time a new column value is added, am I going about things the correct way?
Bookmarks