LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Multiple Sorts

Ruan, try this:

Sub Sort_CounselorNames(sht As Worksheet, pwd As String)

Application.ScreenUpdating = False
sht.Unprotect Password:=pwd

Dim CL As Range
For Each CL In sht.Range("B8:AA30").Columns ' <== Changed
CL.Sort Key1:=CL.Cells(1), _
Order1:=xlAscending, _
Header:=xlNo, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
Next

sht.Protect Password:=pwd
Application.ScreenUpdating = True

End Sub


--
Soo Cheon Jheong
http://excel.hompy.com
Seoul, South Korea
_ _
^ąŻ^
--

"Soo Cheon Jheong" wrote in message
...
Ruan, try this:

Sub Sort_CounselorNames(sht As Worksheet, pwd As String)

Application.ScreenUpdating = False
sht.Unprotect Password:=pwd

Dim CL As Range
For Each CL In Range("B8:AA30").Columns
CL.Sort Key1:=CL.Cells(1), _
Order1:=xlAscending, _
Header:=xlNo, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
Next

sht.Protect Password:=pwd
Application.ScreenUpdating = True

End Sub


--
Soo Cheon Jheong
http://excel.hompy.com
Seoul, South Korea
_ _
^ąŻ^
--




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum by different sorts livetohike Excel Discussion (Misc queries) 2 November 5th 07 02:41 PM
Sorts Mona Marie Excel Worksheet Functions 3 July 21st 06 06:07 PM
same range, multiple sheets, different sorts, help please! nikmasteed Excel Worksheet Functions 2 May 19th 06 04:30 PM
Excel gets subtotals out of order using multiple sorts and subtot. jeffl Excel Discussion (Misc queries) 1 March 29th 05 01:35 AM
Macro for Multiple Sorts Dakota Excel Programming 5 February 4th 04 03:25 PM


All times are GMT +1. The time now is 07:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"