Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Alphabatizing my worksheets

What code might I use to sort all the worksheets except the master summary
sheet into alphabetic order? (The master summary sheet's tab name is unique
and I want it to always be the first tab in the workbook.)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Alphabatizing my worksheets

You could use a macro...

Chip Pearson's:
http://www.cpearson.com/excel/sortws.htm

David McRitchie's:
http://www.mvps.org/dmcritchie/excel...#sortallsheets

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

=======
And I'd just let the macro sort the mastersheet, too. Then after the sort, you
can add code to move it to the leftmost position.

Sheets("summary").Move befo=Sheets(1)

(change the name as required.)

John wrote:

What code might I use to sort all the worksheets except the master summary
sheet into alphabetic order? (The master summary sheet's tab name is unique
and I want it to always be the first tab in the workbook.)


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 199
Default Alphabatizing my worksheets

This is a very primitive one. But try it.

Sub sortsheetname()
Dim n As Long, i As Long
For n = Worksheets.Count To 1 Step -1
For i = 2 To n - 1
If Worksheets(i).Name Worksheets(i + 1).Name Then
Worksheets(i).Move after:=Worksheets(i + 1)
End If
Next
Next
End Sub

Keiji

John wrote:
What code might I use to sort all the worksheets except the master summary
sheet into alphabetic order? (The master summary sheet's tab name is unique
and I want it to always be the first tab in the workbook.)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Alphabatizing my worksheets

This was a lot of help. Thx for all the additional links!

I appreciate your help, -John

"Dave Peterson" wrote:

You could use a macro...

Chip Pearson's:
http://www.cpearson.com/excel/sortws.htm

David McRitchie's:
http://www.mvps.org/dmcritchie/excel...#sortallsheets

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

=======
And I'd just let the macro sort the mastersheet, too. Then after the sort, you
can add code to move it to the leftmost position.

Sheets("summary").Move befo=Sheets(1)

(change the name as required.)

John wrote:

What code might I use to sort all the worksheets except the master summary
sheet into alphabetic order? (The master summary sheet's tab name is unique
and I want it to always be the first tab in the workbook.)


--

Dave Peterson

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
Compare Rows on different Worksheets and Output Difference's to other Worksheets. [email protected] Excel Programming 3 September 19th 07 04:48 PM
How use info in Excel shared worksheets to create new worksheets dkc Excel Worksheet Functions 0 June 28th 07 08:36 PM
VBA / Macro for creating new worksheets and new columns from existing worksheets webby2006 Excel Programming 3 July 25th 06 03:38 PM
Alphabatizing Combo Boxes Dave Marden[_3_] Excel Programming 3 September 27th 04 08:35 AM
Need code to protect worksheets - amount of worksheets varies Sandy[_3_] Excel Programming 1 September 9th 03 02:17 AM


All times are GMT +1. The time now is 05:44 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"