Book

Suggestions


Enter your email address:

Delivered by FeedBurner


Home Page

Bloglines

1906
CelebrateStadium
2006


OfficeZealot

Scobleizer

TechRepublic

AskWoody

SpyJournal












Subscribe here
Add to 

My Yahoo!
This page is powered by Blogger. Isn't yours?

Host your Web site with PureHost!


eXTReMe Tracker
  Web http://www.klippert.com



  Friday, November 14, 2008 – Permalink –

Sort Worksheets

Order tabs


Worksheets can be dragged and dropped into any order required. They can be set up in numeric or alpha order, but doing it by hand is a bother.

Chip Pearson has written some macros that will do the job for you:

  • Sorting Worksheets In Alphabetical Order
  • Sorting In Custom Order
  • Grouping Sheets By Color


Here's the code to sort by tab color:


Sub GroupSheetsByColor()
Dim Ndx As Long
Dim Ndx2 As Long
For Ndx = 1 To Worksheets.Count - 1
For Ndx2 = Ndx To Worksheets.Count
If Worksheets(Ndx2).Tab.ColorIndex = _
Worksheets(Ndx).Tab.ColorIndex Then
Worksheets(Ndx2).Move after:=Worksheets(Ndx)
End If
Next Ndx2
Next Ndx
End Sub


Sorting Worksheets In A Workbook


(The colorindex variable chooses one of the 56 colors in Excel's basic palette.
Here are all the colors and numbers as compiled by F. David McRitchie:
Excel Colors )



See all Topics

Labels: , ,


<Doug Klippert@ 3:37 AM

Comments: Post a Comment