Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a data range, where I want to sort by Column Q. When I recorded the
macro to sort by column q, below code was generated. ActiveCell.Cells.Select ActiveWorkbook.worksheets("images").Sort.SortField s.Clear ActiveWorkbook.worksheets("images").Sort.SortField s.Add Key:= _ ActiveCell.Offset(0, 16).range("A1:A35018"), SortOn:= _ xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.worksheets("images").Sort .SetRange ActiveCell.range("A1:Z35018") .Header = xlGuess .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Is there a better way of sorting by column than the above code? |
Reply |
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 |