Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() maybe something like this: Sub sort_cols() Dim ws As Worksheet Set ws = Worksheets("Sheet1") With ws.Range("A1:C7") .Sort Key1:=ws.Range("C1"), Order1:=xlAscending, Key3:=ws.Range("A1") _ , Order3:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption3 _ :=xlSortNormal End With End Sub -- Gary "Jock" wrote in message ... How can I sort numbers from 1-7 in column 'C' ascending and then sort the dates in column 'A' in descending order for each group of numbers in 'C' with one piece of code? A C 15/08 2 14/08 3 16/08 2 17/08 3 16/08 3 15/08 1 Hope that makes sense!! -- Traa Dy Liooar Jock |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting a Pivot Table Column that is not the first column... | Excel Worksheet Functions | |||
How do I limit sorting a column to the column? | Excel Worksheet Functions | |||
Sorting 1 column into two | Excel Discussion (Misc queries) | |||
Right column doesn't change when sorting left column. | Excel Discussion (Misc queries) | |||
sorting a column | Excel Programming |