Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sum by different sorts | Excel Discussion (Misc queries) | |||
Sorts | Excel Worksheet Functions | |||
same range, multiple sheets, different sorts, help please! | Excel Worksheet Functions | |||
Excel gets subtotals out of order using multiple sorts and subtot. | Excel Discussion (Misc queries) | |||
Macro for Multiple Sorts | Excel Programming |