Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Organize the worksheets in numerical order

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Organize the worksheets in numerical order

Thank you. This is what I needed.

"Gord Dibben" wrote:

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?


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I resort numerical info into numerical order Liz M Excel Worksheet Functions 1 May 19th 10 12:09 PM
organize a list of names in alphabetical order durnford Excel Discussion (Misc queries) 1 October 24th 08 05:51 PM
What is the best way to organize a data in order to PRINT specific FC Excel Discussion (Misc queries) 4 July 9th 07 10:56 AM
Need organize numbered order Sharon Clemens New Users to Excel 1 November 5th 06 08:10 PM
sort worksheets in numerical order andrew Excel Discussion (Misc queries) 2 February 7th 05 09:09 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"