Selecting a defined Name via a cell's contents
JE,
I've got one more thing that I need help with.
This is still regarding defined name ranges.
Selection.Sort Key1:=Range("AJ2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Im using the above code to sort. however, I need to base the 'SortKey1' on
the first column of the selected unknown defined name range.
Without knowing that AJ2 is the first column of the define name range that
is selected (which was selected using the previous suggestion
Range(Range("A2").Value).Select ), I need to sort based on the first
column of the selected range
Can this be done?
Thanks again,
Paul
"JE McGimpsey" wrote in message
...
one way:
Range(Range("A2").Value).Select
another:
ActiveWorkbook.Names(Range("A2").Value).RefersToRa nge.Select
In article ,
"PCLIVE" wrote:
I have this.
Range("Green").Select
"Green" is a define name of a cell range.
If "Green" is also the contents of cell A2, how can I rewrite the Select
statement so that it will refer to the defined name range that is in cell
A2?
Thanks,
Paul
|