How to sort worksheets in alphabetical / alphanumeric order in Excel?

Normally you can sort or arrange worksheet tabs order in Excel by dragging and dropping the sheet tabs on the sheet tab bar. But for getting this done with multiple worksheets, you may consider the following tricky ways to quickly sort worksheets in alphabetical / alphanumeric order in a large workbook.

Sort worksheets in alphabetical / alphanumeric order with VB code

Sort worksheets in alphabetical / alphanumeric order with Kutools for Excel

Kutools for Excel: add 120 new features in Excel. Save one hour every day.
Classic Menu for Office: brings back classic menus to Office 2010 and 2013 (includes Office 365).
Office Tab: brings tabbed interface to Office as the use of web browser Chrome, Firefox and Internet Explorer.

arrow blue right bubble Sort worksheets in alphabetical / alphanumeric order with VB code

Hot
Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10!

There is a macro for sorting worksheets by alpha posted in the Microsoft Support center. We can apply it with following steps:

Step 1: Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

Step 2: Click Insert > Module, and then paste the following macro in the Module Window.

VBA: Sort sheets order.

Sub SortWorkBook()
'Updateby20140624
Dim xResult As VbMsgBoxResult
xTitleId = "KutoolsforExcel"
xResult = MsgBox("Sort Sheets in Ascending Order?" & Chr(10) & "Clicking No will sort in Descending Order", vbYesNoCancel + vbQuestion + vbDefaultButton1, xTitleId)
For i = 1 To Application.Sheets.Count
For j = 1 To Application.Sheets.Count - 1
If xResult = vbYes Then
If UCase$(Application.Sheets(j).Name) > UCase$(Application.Sheets(j + 1).Name) Then
Sheets(j).Move after:=Sheets(j + 1)
End If
ElseIf xResult = vbNo Then
If UCase$(Application.Sheets(j).Name) < UCase$(Application.Sheets(j + 1).Name) Then
Application.Sheets(j).Move after:=Application.Sheets(j + 1)
End If
End If
Next
Next
End Sub

Step 3: Press the F5 key to run this macro. In the following prompt box, click Yes, all the worksheets will be sorted by ascending alphabetical order; and click No, all the worksheets will be sorted by descending alphabetical order.

doc-sort-sheets6


arrow blue right bubble Sort worksheets in alphabetical / alphanumeric order with Kutools for Excel

If you are not familiar with macros or prefer to other ways, you can try Kutools for Excel. Kutools for Excel's Sort Sheets tool can sort all worksheets easily.

Kutools for Excel includes more than 120 handy Excel tools. Free to try with no limitation in 30 days. Get it Now.

Step 1: Click Enterprise > Worksheet Tools > Sort Sheets. See screenshot:

doc-sort-sheets2

Step 2: In the Sort Sheets dialog box, select one of sorting type that you need, such as Alpha Sort, Alpha Numeric Sort. See screenshot:

doc-sort-sheets3

Step 3: Click OK. Then all worksheets will be sorted in the selected way. See screenshots:

doc-sort-sheets4
-1
doc-sort-sheets5

Kutools for Excel's Sort Sheets tool can quickly rearrange all worksheets in the active workbook. It supports several sorting types, including Alpha Sort, Alpha Numeric Sort, Color Sort and Reverse. In addition, you can also move up / down worksheets, and reset the sorting. Click to know more about this utility.


Related article:

Sort worksheet tabs by color


Kutools for Excel

More than 120 Advanced Functions for Excel 2013, 2010, 2007 and Office 365.

screen shot

btn read more     btn download     btn purchase

Comments  

+5#domclobar2013-11-07 11:23
Macro worked perfectly. Thanks for the help and saving me fair amount of time!
Reply | Reply with quote | Quote
+1#Ross2014-01-03 21:22
Thanks! Worked like a charm! Greatly appreciate the info!
Reply | Reply with quote | Quote
+1#Howard2014-01-09 15:40
AMAZING! Thank you so much!
Reply | Reply with quote | Quote
+4#azhar2014-01-23 08:08
AMAZING! Thank you so much
Macro worked perfectly. Thanks for the help and saving me fair amount of time! :D
Reply | Reply with quote | Quote
-1#Dan2014-01-23 18:48
worked like a charm, thanks for the help!!
Reply | Reply with quote | Quote
+1#Suzen2014-01-28 21:38
Macro worked great!!! Thank you so much for the info! My boss was impressed that I fixed the sheets in alpha order so quickly! :lol:
Reply | Reply with quote | Quote
0#JA2014-01-30 17:44
Baby's first macro, and it worked perfectly. Thanks!
Reply | Reply with quote | Quote
-1#JZ2014-02-14 18:25
The instructions and macro worked great! Why isn't this part of MS Excel by default?
Reply | Reply with quote | Quote
+1#E-sa2014-03-05 23:32
Macro worked great!!! I appreciated all your help.... It is a good thing to teach people who really love to learn... Have a great life...
Reply | Reply with quote | Quote
0#Raquel2014-03-19 15:14
Macro worked beautifully! Thanks.
:lol:
Reply | Reply with quote | Quote
0#Ragal2014-03-27 09:36
Awesome :-) Thank you very much VB worked great....
Appreciated...
Ragal
Reply | Reply with quote | Quote
0#LauraB2014-04-11 15:46
Saved me hours! Thank you!
Reply | Reply with quote | Quote
0#Beginner2014-04-11 15:54
Works Excellent. Thanks wizard!
Reply | Reply with quote | Quote
0#tapendra2014-04-15 06:04
amazing help me so much please mail me these kind of things so i can also use in future thanx
Reply | Reply with quote | Quote
0#Laurac2014-04-15 20:41
Macro worked perfect and I have 75 sheets in this workbook!
Reply | Reply with quote | Quote
0#Laurac2014-04-15 20:42
Macro worked perfect! and i have 75 sheets in my report!
Reply | Reply with quote | Quote
0#JOBY2014-05-08 10:04
EXCELLENT MACRO! SALUTE
Reply | Reply with quote | Quote
0#Diane Kington2014-05-19 10:47
Brilliant . Thanks for sharing this
Reply | Reply with quote | Quote
0#sathish2014-05-19 12:17
I am getting error Screen Shot 2014-05-19 at 5.43.19 Screen Shot 2014-05-19 at 5.43.19 PM
Reply | Reply with quote | Quote
0#Sammi2014-06-01 17:30
The Macro works perfectly :lol: no issues. Thank you so much for the information. SUCH a lifesaver!!
Reply | Reply with quote | Quote
0#Red Rose2014-06-23 11:47
great information ... thanks a lot
Reply | Reply with quote | Quote
-1#Excel User2014-07-11 00:33
it's faster if you sort the names of the sheets in an array and then
move the sheets based on the array.

i.e. after sorting the array

'start with 2 as the first one will be the only one not moved.
For r = 2 To UBound(sheetnamearray)
Sheets(Sheets(sheetnamearray(r)).Name).Move After:=Sheets(sheetnamearray(r - 1))
Next
Reply | Reply with quote | Quote
0#Jen2014-08-04 15:26
Thank you, thank you, thank you! Love it.
Reply | Reply with quote | Quote
0#Dellibabu2014-08-07 15:00
this macro really Excellent, thank you very much for giving it
Reply | Reply with quote | Quote
0#Ross2014-08-13 14:07
Wondering if anyone could help me.
If i had tabs Alpha,Bravo,Charlie,Delta, Echo etc and i wanted to sort the tabs according to a list. lets say list contains Alpha, Charlie, Echo..is there anyway to do this? and the remaining tabs to alight behind the listed tabs in alphabetical order?

thanks
Reply | Reply with quote | Quote

Add comment


Security code
Refresh