Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi,
does somebody know that how can I sort worksheets by name in a workbook? thanks in advance -- sisco98 |
#2
![]() |
|||
|
|||
![]()
http://www.cpearson.com/excel/sortws.htm
-- HTH Bob Phillips "sisco98" wrote in message ... Hi, does somebody know that how can I sort worksheets by name in a workbook? thanks in advance -- sisco98 |
#3
![]() |
|||
|
|||
![]()
you could try this:
Sub Test() Dim wsAfter As Integer Dim wsBefore As Integer For wsAfter = 1 To Worksheets.Count For wsBefore = wsAfter To Worksheets.Count If UCase(Worksheets(wsBefore).Name) < _ UCase(Worksheets(wsAfter).Name) Then _ Worksheets(wsBefore).Move Befo=Worksheets(wsAfter) Next Next End Sub or this: http://www.cpearson.com/excel/sortws.htm Regards, KL "sisco98" wrote in message ... Hi, does somebody know that how can I sort worksheets by name in a workbook? thanks in advance -- sisco98 |
#4
![]() |
|||
|
|||
![]()
thanks for your quick respond, your code works very good.
-- sisco98 "KL" wrote: you could try this: Sub Test() Dim wsAfter As Integer Dim wsBefore As Integer For wsAfter = 1 To Worksheets.Count For wsBefore = wsAfter To Worksheets.Count If UCase(Worksheets(wsBefore).Name) < _ UCase(Worksheets(wsAfter).Name) Then _ Worksheets(wsBefore).Move Befo=Worksheets(wsAfter) Next Next End Sub or this: http://www.cpearson.com/excel/sortws.htm Regards, KL "sisco98" wrote in message ... Hi, does somebody know that how can I sort worksheets by name in a workbook? thanks in advance -- sisco98 |
#5
![]() |
|||
|
|||
![]()
You're most welcome.
KL "sisco98" wrote in message ... thanks for your quick respond, your code works very good. -- sisco98 "KL" wrote: you could try this: Sub Test() Dim wsAfter As Integer Dim wsBefore As Integer For wsAfter = 1 To Worksheets.Count For wsBefore = wsAfter To Worksheets.Count If UCase(Worksheets(wsBefore).Name) < _ UCase(Worksheets(wsAfter).Name) Then _ Worksheets(wsBefore).Move Befo=Worksheets(wsAfter) Next Next End Sub or this: http://www.cpearson.com/excel/sortws.htm Regards, KL "sisco98" wrote in message ... Hi, does somebody know that how can I sort worksheets by name in a workbook? thanks in advance -- sisco98 |
#6
![]() |
|||
|
|||
![]()
http://www.cpearson.com/excel/sortws.htm
-- Kind regards, Niek Otten Microsoft MVP - Excel "sisco98" wrote in message ... Hi, does somebody know that how can I sort worksheets by name in a workbook? thanks in advance -- sisco98 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting Protected Worksheet | Excel Discussion (Misc queries) | |||
Sorting on a protected worksheet | Excel Discussion (Misc queries) | |||
Sorting a worksheet with drop list | Excel Discussion (Misc queries) | |||
Question about sorting in protected worksheet | Excel Worksheet Functions | |||
Sorting protected worksheet | Excel Discussion (Misc queries) |