Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Is it possible to sort Excel sheet tabs; i.e. alphabetically?


--
Darlene
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Is it possible to sort Excel sheet tabs; i.e. alphabetically?

On 2 Jan, 20:49, Darlene wrote:
--
Darlene


Yes,

I found the following code----

Sub SortSheets()

Dim lCount As Long, lCounted As Long

Dim lShtLast As Long

Dim lReply As Long

lReply = MsgBox("To sort Worksheets ascending, select 'Yes'. " _

& "To sort Worksheets descending select 'No'", vbYesNoCancel, "Ozgrid
Sheet Sort")

If lReply = vbCancel Then Exit Sub

lShtLast = Sheets.Count

If lReply = vbYes Then 'Sort ascending

For lCount = 1 To lShtLast

For lCount2 = lCount To lShtLast

If UCase(Sheets(lCount2).Name) < UCase(Sheets
(lCount).Name) Then

Sheets(lCount2).Move Befo=Sheets(lCount)

End If

Next lCount2

Next lCount

Else 'Sort descending

For lCount = 1 To lShtLast

For lCount2 = lCount To lShtLast

If UCase(Sheets(lCount2).Name) UCase(Sheets
(lCount).Name) Then

Sheets(lCount2).Move Befo=Sheets(lCount)

End If

Next lCount2

Next lCount

End If

------------------------------------------------------

Anthony
http://www.excel-ant.co.uk
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Is it possible to sort Excel sheet tabs; i.e. alphabetically?

Hi,

Right click any sheet tab, view code and paste this in and run it

Sub Sortem()
LastSheet = Sheets.Count
For ws = 1 To LastSheet
For ws2 = ws To LastSheet
If UCase(Sheets(ws2).Name) < UCase(Sheets(ws).Name) Then
Sheets(ws2).Move Befo=Sheets(ws)
End If
Next ws2
Next ws
End Sub

Mike

"Darlene" wrote:


--
Darlene

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Is it possible to sort Excel sheet tabs; i.e. alphabetically?

Hi,

1. There is no command built into Excel to do this.
2. You need to use VBA code to do it and here is a site with just that:
http://www.cpearson.com/excel/sortws.aspx

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Darlene" wrote:


--
Darlene

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 46
Default Is it possible to sort Excel sheet tabs; i.e. alphabetically?

Hi Darlene

There is an excellent solution he

http://www.contextures.com/xlToolbar01.html

It allows you to sort the tabs AND also naviagte them easily.
Very easy to set up - just follow the instructions.

"Darlene" wrote:


--
Darlene

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 sort alphabetically in Excel seh60025 Excel Discussion (Misc queries) 1 October 26th 06 10:25 PM
Alphabetically order sheet tabs?? Bro23 Excel Discussion (Misc queries) 11 June 21st 06 08:22 PM
How do I sort in Excel alphabetically? Jennifer Excel Discussion (Misc queries) 2 January 20th 06 04:42 PM
sort sheet tabs in Excel JOJO Excel Worksheet Functions 2 May 19th 05 04:36 AM
Can I sort Excel sheet tabs alphabetically? Governors Club Excel Discussion (Misc queries) 1 February 25th 05 07:56 PM


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