Excel spreadsheet sort

  • Thread starter Thread starter Nev
  • Start date Start date
N

Nev

I have a spreadsheet which I want to sort the columns are

1st A - Week Number (Number)

2nd B- Operator name (Text)

3rd C - Days of the week Mon through Sunday


best way using code
 
Nev

record a macro while you carry out the sort manually. That should give you
the basis of the code you need.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 31/10/2003 by
'

'
Selection.Sort Key1:=Range("A2"), _
Order1:=xlAscending, _
Key2:=Range("B2"), _
Order2:=xlAscending, _
Key3:=Range("C2"), _
Order3:=xlAscending, _
Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
End Sub

Regards

Trevor
 
Back
Top