Organize the worksheets in numerical order
Depends upon where "included numbers" are located in the sheet name.
Mike's macro will sort by numbers included within or at either end of sheet
names.
Sub sort_sheets()
'Mike H June 13th, 2007
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
Gord Dibben MS Excel MVP
On Mon, 26 Oct 2009 12:21:02 -0700, TGalin
wrote:
I have a workbook with sheets that have similar names. The only difference
between the worksheet names is the numbers included in them. Is it possible,
using a macro, to organize the worksheets in numerical order?
|