Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, Found a solution myself now. Made the Header as NO and made the Sort Key the same as the range to be sorted. This is what I now have and it seems to work okay. Sub SSB_Name_Sort() Application.ScreenUpdating = False Range("SortSSBs1").Select Selection.Sort Key1:=Range("SortSSBs1"), Order1:=xlAscending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Range("SortSSBs2").Select Selection.Sort Key1:=Range("SortSSBs2"), Order1:=xlAscending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Range("SortSSBs3").Select Selection.Sort Key1:=Range("SortSSBs3"), Order1:=xlAscending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Range("A1").Select End Sub -- BernzG ------------------------------------------------------------------------ BernzG's Profile: http://www.excelforum.com/member.php...o&userid=22949 View this thread: http://www.excelforum.com/showthread...hreadid=541347 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Variable Range Sort | Excel Discussion (Misc queries) | |||
Can I use a variable as a sort key in VB? | Excel Programming | |||
How do I use a variable in a sort macro | Excel Worksheet Functions | |||
Sort : how can I use a variable in a VB sort function? | Excel Worksheet Functions | |||
Sorting with variable number of sort fields | Excel Programming |