ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to sort worksheets in alphabetical order (descending or ascending)? (https://www.excelbanter.com/excel-discussion-misc-queries/146292-how-sort-worksheets-alphabetical-order-descending-ascending.html)

[email protected]

How to sort worksheets in alphabetical order (descending or ascending)?
 

Hi

Am using Excel 2003.
I am using a workbook with various worksheets named differently.

For example, I have the following worksheets in the "tabs" area:

Sheet Kiwi
Sheet Apple
Sheet Orange
Sheet Banana

How can I sort them, so that they appear to me (from left to right)
like:

Sheet Apple
Sheet Banana
Sheet Kiwi
Sheet Orange

Thanks a lot.


Mike H

How to sort worksheets in alphabetical order (descending or ascend
 
You could try

Sub liminal_advertisment()
Dim I As Integer, J As Integer

For I = 1 To Sheets.Count - 1
For J = I + 1 To Sheets.Count
If UCase(Sheets(I).Name) UCase(Sheets(J).Name) Then
Sheets(J).Move Befo=Sheets(I)
End If
Next J
Next I


End Sub

Mike

" wrote:


Hi

Am using Excel 2003.
I am using a workbook with various worksheets named differently.

For example, I have the following worksheets in the "tabs" area:

Sheet Kiwi
Sheet Apple
Sheet Orange
Sheet Banana

How can I sort them, so that they appear to me (from left to right)
like:

Sheet Apple
Sheet Banana
Sheet Kiwi
Sheet Orange

Thanks a lot.



Bill Sharpe

How to sort worksheets in alphabetical order (descending or ascending)?
 
wrote:
Hi

Am using Excel 2003.
I am using a workbook with various worksheets named differently.

For example, I have the following worksheets in the "tabs" area:

Sheet Kiwi
Sheet Apple
Sheet Orange
Sheet Banana

How can I sort them, so that they appear to me (from left to right)
like:

Sheet Apple
Sheet Banana
Sheet Kiwi
Sheet Orange

Thanks a lot.

If you only have four sheets you can just drag the tab names to where
you want them. Otherwise, the macro approach is better.

Bill


All times are GMT +1. The time now is 07:34 PM.

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