ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel spreadsheet sort (https://www.excelbanter.com/excel-programming/281188-excel-spreadsheet-sort.html)

Nev[_4_]

Excel spreadsheet sort
 
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



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


Don Guillett[_4_]

Excel spreadsheet sort
 
record a macro while you do it.

"Nev" wrote in message
...
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



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/




Trevor Shuttleworth

Excel spreadsheet sort
 
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
"Nev" wrote in message
...
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



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/





All times are GMT +1. The time now is 12:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com