Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have defined a named range in vba
srt = Cells(1, i).Value & "_sort" ActiveWorkbook.Names.Add Name:=srt, RefersTo:=Range(Cells(2, 6), Cells(lastrow, 6)) where lastrow is 45 How can I use the range to sort the data? (The worksheet name is "Data") I have tried Selection.Sort Key1:=ActiveSheet.Name!srt, Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal but this gives me and Object required error. Could someone give me the correct way to enter the named range in the selection command please? Thanks CHris |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Referencing a named range based upon Range name entry in cell | Excel Worksheet Functions | |||
automatic range - named range give me circular reference... | Excel Discussion (Misc queries) | |||
Array as a "named range" - formula ok in cells, but error as "named range" | Excel Discussion (Misc queries) | |||
inserting a named range into new cells based on a named cell | Excel Discussion (Misc queries) | |||
Sorting lists of Named Ranges | Excel Programming |