Heidi Doan has attended:
Word Advanced course
Excel Advanced course
Access Introduction course
Outlook Advanced course
Arranging sheets alphabetically
Hi, how do I arrange all the sheets in a workbook alphabetically? Thanks.
RE: Arranging sheets alphabetically
Heidi
Excel doesn't provide a feature that sorts a workbook's sheets alphabetically by sheet name.
However, you can use the simple procedure below. To do this:
1. Press Alt + F8 to display Excel's Macro dialog box
2. In the Macro Name window type in AlphaSheet (Or any other macro name you wish)
3. Click the Create button
The Visual Basic Editor appears, open at a new module sheet already containing the beginning and ending statements in the procedure.
Fill in the rest of the code or copy the middle part of the procedure below and paste it into the code window so as to complete the procedure
Sub AlphaSheet()
Dim Count As Integer
Dim i As Integer
Dim j As Integer
Application.ScreenUpdating = False
Count = Sheets.Count
For i = 1 To Count - 1
For j = i + 1 To Count
If Sheets(j).Name < Sheets(i).Name Then
Sheets(j).Move Before:=Sheets(i)
End If
Next
Next
End Sub
Close the Visual Basic Editor and return to Excel. To run the procedure:
1. Press Alt + F8 to display Excel's Macro dialog box
2. Choose AlphaSheet from the list of macro names
3. Click OK.
This will arrange the sheets alphabetically.
Carlos