To reverse worksheet tab order in Excel for Microsoft 365 on Windows, drag the sheet tabs into the opposite order, or run a short VBA macro to reverse every sheet at once. Excel has no built-in command that automatically reverses all worksheet tabs; the best method depends on how many tabs you need to move and whether macros are available.
What “reverse worksheet order” means
Worksheet order is the left-to-right sequence of tabs along the bottom of a workbook. If the tabs currently read January, February, March, April, reversing their order makes them April, March, February, January. The change affects where the sheets appear in the workbook, not the order of rows or columns inside any sheet.
This distinction matters because “reverse order” can also refer to sorting a table from newest to oldest, flipping a list of records, or changing a printed page sequence. Those are separate tasks. Moving worksheet tabs does not sort data, change formulas, or rearrange pages within a sheet.
Excel retains sheet names and their contents when you move tabs. Formulas that refer to sheets normally continue to refer to the same sheets, even after their positions change. Still, tab order can affect how a workbook is navigated, presented, or printed, so it is sensible to check the result before sharing a reorganized file.
Reverse a few tabs by dragging
For a small workbook, dragging tabs is usually the quickest approach. In desktop Excel, select a tab, hold the mouse button, and drag it left or right. A small marker indicates where the sheet will be placed when you release the button. Repeat until the tabs appear in the desired reverse order.
- Look at the current tab sequence and decide what the final sequence should be. For example, change Q1, Q2, Q3, Q4 to Q4, Q3, Q2, Q1.
- Drag one tab at a time to its new position. If tabs are crowded, use the sheet-navigation controls at the bottom left of the Excel window to bring the relevant tabs into view.
- Read the full tab sequence when finished. If the workbook contains many sheets, scroll through the tab strip and check the order from beginning to end.
Dragging changes the position of one sheet at a time, so it is easy to make a partial change without noticing. A useful approach is to write down the intended sequence first, especially when names are similar or the workbook has a long run of monthly or numbered sheets. Do not select several tabs as a group unless you intend to move that group together; grouped sheets can also be affected by editing actions.
Move a sheet with the Move or Copy dialog
The dialog is useful when a tab is difficult to drag or when you want to place one sheet at a specific position. Right-click the sheet tab, choose Move or Copy, select the destination workbook if needed, and choose a sheet in the Before sheet list. Click OK. The selected sheet is placed before the sheet you chose.
For example, if the tabs are A, B, C, D and you want D, C, B, A, move D before A, then move C before A, and then move B before A. The anchor sheet A stays in the workbook, while each selected sheet is inserted immediately in front of it. This takes several operations, so dragging may be simpler for a few tabs; the dialog can be more precise when the tab strip is crowded.
Use Move or Copy rather than assuming that copying is required. Leave Create a copy unchecked to move the sheet. If you check it, Excel creates another sheet and leaves the original where it was. Moving a sheet to a different workbook is also possible through the destination list, but that is not the same as reversing the order within the current workbook.
Reverse all sheets at once with VBA
For a workbook with many tabs, a VBA macro can reverse the complete tab sequence in one run. The macro below stores the original sheet references, then moves each sheet after the first to the beginning. It uses the workbook containing the macro and includes chart sheets as well as worksheets because it works with the workbook’s Sheets collection.
Save a backup copy before running the macro. In Excel, open the Visual Basic editor from the Developer tab, choose Insert > Module, paste the code into the module, and run ReverseSheetOrder. If the Developer tab is hidden, enable it in Excel Options under Customize Ribbon.
Sub ReverseSheetOrder()
Dim sheetOrder() As Object
Dim sheetCount As Long
Dim i As Long
' Store the current sheet order before moving anything.
sheetCount = ThisWorkbook.Sheets.Count
If sheetCount < 2 Then Exit Sub
ReDim sheetOrder(1 To sheetCount)
For i = 1 To sheetCount
Set sheetOrder(i) = ThisWorkbook.Sheets(i)
Next i
' Move each later sheet to the beginning.
For i = 2 To sheetCount
sheetOrder(i).Move Before:=ThisWorkbook.Sheets(1)
Next i
End Sub
For instance, the stored order A, B, C, D becomes B, A, C, D when B moves to the beginning, then C, B, A, D, and finally D, C, B, A. Capturing the original sheet references first is important: the tab positions change as the macro runs, but the references still point to the sheets that were originally recorded.
The code uses ThisWorkbook, meaning the workbook where the macro code is stored. Put the code in the workbook you want to reorder. If you keep macros in another workbook, such as a personal macro workbook, this reference points to that other workbook instead; do not run the code unchanged unless that is the workbook you mean to rearrange.
What changes—and what does not
Reversing tabs changes sheet position, not sheet identity. A formula that refers to a named worksheet is generally still directed to that worksheet after it moves. For example, moving a sheet called Sales does not rename it or turn a formula referring to Sales into a reference to whichever sheet happens to occupy its former position.
There are practical exceptions to keep in mind. A macro or external process might rely on sheet positions or specific tab names, and a workbook may use the first sheet as a landing page by convention. Reversing the order could therefore change how a user encounters the file even if the underlying data and formulas remain intact. Review instructions, navigation links, and any process that assumes a particular tab is first.
The macro above reverses all entries in the Sheets collection, including chart sheets. Hidden sheets are also part of the workbook’s sheet collection and can be included in the reordering. If you want to change only visible worksheets, or keep chart sheets in fixed positions, use a tailored macro or move only the specific tabs manually rather than running this all-sheets version.
Common problems and safeguards
- The tab will not move: The workbook structure may be protected. Check Review > Protect Workbook; if structure protection is on, you need permission and, if required, the password to turn it off before changing sheet order.
- The wrong sheet moved: Tab names can be truncated when many sheets are present. Widen the Excel window or use the navigation controls to identify the tab before dragging or opening its context menu.
- The macro is blocked: Excel may disable macros depending on the file’s source and security settings. Use a trusted workbook and follow your organization’s security policy; do not enable macros in an unknown file just to reorder tabs.
- The macro cannot be undone: Excel’s Undo command, including Ctrl+Z on Windows, does not reverse VBA actions. Save a copy first, then inspect the tab order immediately after running the macro.
- The macro disappears after saving: A workbook saved as an ordinary
.xlsxfile cannot store VBA code. Save a macro-enabled workbook as.xlsmif you need to keep the macro in that file.
Excel for Mac and Excel for the web
In Excel for Mac, you can also drag sheet tabs to reorder them. The context-menu route may be available by Control-clicking or right-clicking a tab and choosing Move or Copy, depending on the Mac’s mouse or trackpad settings. VBA is available in desktop Excel for Mac, although keyboard shortcuts and some editor details differ from Windows; the code’s use of standard workbook sheet objects is not a Windows-only feature.
Excel for the web supports rearranging tabs by dragging them, but it does not run VBA macros. If you need to reverse a large workbook automatically, open it in desktop Excel, run the macro there, and save the workbook. A workbook containing macros should be saved in a macro-enabled format if the code needs to be retained.
Which method should you choose?
Choose the simplest method that meets the need. Dragging is easy for a few sheets and makes the destination visible. The Move or Copy dialog is helpful when a tab is hard to reach or needs an exact insertion point. VBA is convenient when many sheets must be reversed repeatedly, provided you can use macros and have verified that all sheets—including chart or hidden sheets—should move.
For a one-time change to a small workbook, a macro may introduce more risk than it saves in effort. For a recurring report with dozens of consistently arranged tabs, a saved macro-enabled copy can make the task much faster. In either case, confirm the intended order and keep a backup when the workbook is important.
Frequently Asked Questions
Can Excel reverse worksheet tabs automatically without VBA?
Excel does not offer a built-in command that automatically reverses every tab. You can reorder tabs by dragging them or use Move or Copy repeatedly. For a one-run automatic reversal of the entire sheet collection, use VBA in desktop Excel.
Does reversing sheet order reverse the data inside each sheet?
No. It changes the left-to-right position of sheet tabs only. To reverse rows in a table, sort or rearrange the table’s data separately; moving tabs will not change row order.
Will formulas break when I move a worksheet?
Ordinary formulas that refer to a sheet by name generally continue to refer to that same sheet after it moves. However, review macros, links, and workflows that may depend on a sheet being first, last, or at a particular position.
Can I reverse worksheets in Excel for the web?
You can drag tabs to change their order in Excel for the web, but the web version does not run VBA. Use desktop Excel if you want to run the macro shown above.
Can I undo a VBA sheet-order change?
Not with Excel’s normal Undo command. Before running a macro, save a copy of the workbook. You can then restore that copy if the result is not what you intended.
Related
- Excel Number Format for Millions: Codes and Examples
- Excel Decimal Comma: Change Number Separators
- Excel Number Format to Hide Zeros Without Changing Values
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Insert a Curved Line in Word and Adjust Its ShapeTo insert a curved line in Microsoft Word, choose Insert > Shapes, select Curve in the Lines group,…
- Excel Merge Cells Without Losing Data: Safe MethodsExcel’s Merge & Center command does not combine the contents of two cells: it keeps the upper-left cell’s…
- Excel File Corrupted? Recovery Steps That WorkIf an Excel file is corrupted and cannot be repaired, stop working on the original, make a separate…
- Excel Not Responding? Recover an Unsaved FileIf Excel is not responding and your work has not been saved, do not force-close it right away.…
- Excel Row Height Shortcut: Set, Adjust, and AutoFit RowsIn Excel for Microsoft 365 on Windows, press Alt, H, O, H in sequence to open the Row…
- Excel Table Slicers: How to Add, Use, and TroubleshootAn Excel table slicer is a clickable filter panel for an Excel table: choose a button such as…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.