Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Is it possible to sort Excel sheet tabs; i.e. alphabetically?
-- Darlene |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I sort alphabetically in Excel | Excel Discussion (Misc queries) | |||
Alphabetically order sheet tabs?? | Excel Discussion (Misc queries) | |||
How do I sort in Excel alphabetically? | Excel Discussion (Misc queries) | |||
sort sheet tabs in Excel | Excel Worksheet Functions | |||
Can I sort Excel sheet tabs alphabetically? | Excel Discussion (Misc queries) |