Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
This will sort a worksheet range called "TestRange" on the activesheet. It willleave the first row (headings) alone Public Sub SortTheTestRange() Dim DataRange As Range Set DataRange = ActiveSheet.Range("TestRange") With DataRange .Sort _ Key1:=.Cells(1, 1), Order1:=xlAscending, _ Key2:=.Cells(1, 2), Order2:=xlAscending, _ Key3:=.Cells(1, 3), Order3:=xlAscending, _ header:=xlYes 'first row is not sorted End With End Sub regards Paul |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Updating workbook with an alpha sort sheet and a numeric sort shee | Excel Discussion (Misc queries) | |||
sort function for dates does not sort properly in Office 2007 Exc. | Excel Worksheet Functions | |||
Pls. reply Sort Data and copy to next coulmn when sort order chang | Excel Programming | |||
Excel sort by Fill Color by custom list sort | Excel Discussion (Misc queries) | |||
sort (on part of) string - originally posted under Tricky Sort | Excel Programming |