I have a workbook with several dozens tabs (worksheets) in it.
Is there any way to alpha sort those tabs (worksheets) within the workbook?
(Not the info within the worksheets, just the worksheets themselves.)
Thanks in advance.
I have a workbook with several dozens tabs (worksheets) in it.
Is there any way to alpha sort those tabs (worksheets) within the workbook?
(Not the info within the worksheets, just the worksheets themselves.)
Thanks in advance.
if you don't have a command of the alphabet, just pretend they are in order.
True story: A rather unbalanced individual I knew some years back commented that there was nothing about the looks of the letters of the alphabet that connoted their sounds. So, if you taught a child the alphabet backwards, that a was zed and zed was a, and gave him a book where the letters were thusly substituted, it would make as much sense as teaching the alphabet correctly. Fortunately his friends convinced him that experimenting on his children wasn?t a great idea.
1) Record a bogus macro and just select a cell or something.
2) Edit the macro and paste the procedure below over the entire thing
3) Run it.
Hope this helps,
MGP
Sub SortSheets()
Dim CurrentSheet As Integer
Dim PriorSheet As Integer
If Sheets.Count > 1 Then
For CurrentSheet = 2 To Sheets.Count
For PriorSheet = 1 To CurrentSheet - 1
If Sheets(CurrentSheet).Name < Sheets(PriorSheet).Name Then
Sheets(CurrentSheet).Move Before:=Sheets(PriorSheet)
Exit For
End If
Next PriorSheet
Next CurrentSheet
End If
Sheets(1).Select
End Sub
What a great tool to have.
I owe you big; of course will probably never have the opportunity to repay.
Hope the appreciation of a poor, overworked, pick and shovel guy is thanks enough.
> What a great tool to have.
> I owe you big; of course will probably never
> have the opportunity to repay.
> Hope the appreciation of a poor, overworked,
> pick and shovel guy is thanks enough.
It's more than enough, glad I could help.
Sincerely,
MGP
Bookmarks