Note: The other languages of the website are Google-translated. Back to English

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 VBA code
Sort worksheets in alphabetical / alphanumeric order with Kutools for Excel


Sort worksheets in alphabetical / alphanumeric order with VBA code

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

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

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

VBA: Sort sheets in alphabetical / alphanumeric 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

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.


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.

Before applying Kutools for Excel, please download and install it firstly.

1. Click Kutools Plus > Worksheet > Sort Sheets. See screenshot:

2. In the Sort Sheets dialog box, select one sorting type that you need on the right pane, such as Alpha Sort, Alpha Numeric Sort, and then click the OK button. See screenshot:

Then all worksheets are sorted based on the specified sorting type. See screenshot:

doc-sort-sheets6

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.

  If you want to have a free trial (

30
-day) of this utility, please click to download it, and then go to apply the operation according above steps.

Demo: Sort all worksheets in alphabetical / alphanumeric order


Related article:

Sort worksheet tabs by color


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office / Excel 2007-2021 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (81)
Rated 5 out of 5 · 2 ratings
This comment was minimized by the moderator on the site
Macro worked perfectly. Thanks for the help and saving me fair amount of time!
This comment was minimized by the moderator on the site
HI, I CANT SEEM TO SAVE THE SORTED FILE..ITS PROMPTING TO ENABLE SAVING MACROS...ANY HELP ON THAT?
This comment was minimized by the moderator on the site
Thanks! Worked like a charm! Greatly appreciate the info!
This comment was minimized by the moderator on the site
AMAZING! Thank you so much!
This comment was minimized by the moderator on the site
AMAZING! Thank you so much
Macro worked perfectly. Thanks for the help and saving me fair amount of time! :D
This comment was minimized by the moderator on the site
worked like a charm, thanks for the help!!
This comment was minimized by the moderator on the site
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:
This comment was minimized by the moderator on the site
Baby's first macro, and it worked perfectly. Thanks!
This comment was minimized by the moderator on the site
The instructions and macro worked great! Why isn't this part of MS Excel by default?
This comment was minimized by the moderator on the site
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...
This comment was minimized by the moderator on the site
Macro worked beautifully! Thanks. :lol:
This comment was minimized by the moderator on the site
Awesome :-) Thank you very much VB worked great.... Appreciated... Ragal
This comment was minimized by the moderator on the site
Saved me hours! Thank you!
This comment was minimized by the moderator on the site
Works Excellent. Thanks wizard!
This comment was minimized by the moderator on the site
amazing help me so much please mail me these kind of things so i can also use in future thanx
This comment was minimized by the moderator on the site
Macro worked perfect and I have 75 sheets in this workbook!
This comment was minimized by the moderator on the site
Macro worked perfect! and i have 75 sheets in my report!
This comment was minimized by the moderator on the site
EXCELLENT MACRO! SALUTE
This comment was minimized by the moderator on the site
Brilliant . Thanks for sharing this
This comment was minimized by the moderator on the site
I am getting error Screen Shot 2014-05-19 at 5.43.19 Screen Shot 2014-05-19 at 5.43.19 PM
This comment was minimized by the moderator on the site
The Macro works perfectly :lol: no issues. Thank you so much for the information. SUCH a lifesaver!!
There are no comments posted here yet
Load More
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL