Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a sort routine shown below: However, I need H62, F62, B62 & I62 to
not be fixed. How can I determine this number which can be 3000 lines of data. How do I enter this in the code. Thanks Private Sub SortCategoryAssistanceWithHeaders() '/////////////////////////////////////////////////// ' ' SortCategoryAssistanceWithHeaders Macro ' jco - This routine will do a triple level sort ' on 3-columns, omitting the Header ' '/////////////////////////////////////////////////// ' Cells.Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Clear ActiveWorkbook.ActiveSheet.Sort.SortFields.Add Key _ :=Range("H2:H62"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _ :=xlSortNormal ActiveWorkbook.ActiveSheet.Sort.SortFields.Add Key _ :=Range("F2:F62"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _ :=xlSortNormal ActiveWorkbook.ActiveSheet.Sort.SortFields.Add Key _ :=Range("B2:B62"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _ :=xlSortNormal With ActiveWorkbook.ActiveSheet.Sort .SetRange Range("A1:I62") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom Sort Routine | Excel Programming | |||
Sort Routine | Excel Discussion (Misc queries) | |||
Generalising sort routine | Excel Programming | |||
Sort Routine VBA | Excel Programming | |||
Need a Special Sort Routine | Excel Programming |