Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets Sort Tabs Alphabetically: How-To

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Google Sheets has no built-in "sort tabs" command, so you cannot alphabetize sheet tabs with one click. The reliable way is to drag tabs into order manually, or — for workbooks with many tabs — to run a small Google Apps Script that reorders every sheet by name. Manual dragging is fine for a handful of tabs; the script is the practical choice once you pass roughly ten sheets or need to repeat the sort regularly.

Worth knowing before you start: tab order is per-spreadsheet and is not saved as a filter or view. Anyone with edit access can reorder tabs, and the order syncs to everyone viewing the file. Sorting tabs does not touch the data inside any sheet, so cell references, formulas and named ranges keep working — only the tab strip changes.

What You'll Need

  • A Google account with edit access to the spreadsheet (Viewer or Commenter access will not let you move tabs).
  • A desktop browser for the script method — the Apps Script editor is not available in the Google Sheets mobile app.
  • For the manual method, nothing extra; it works in the browser and in the mobile app.
  • A backup habit: use File > Make a copy before running any script on an important workbook.

Step-by-Step

Method 1: Drag tabs manually (small workbooks)

  1. Open the spreadsheet in Google Sheets on a computer or in the mobile app.
  2. Look at the tab strip along the bottom of the window. If you see a scroll arrow or a list icon at the far left, click it to see every tab in a dropdown — useful when tabs are hidden off-screen.
  3. Click and hold a tab, then drag it left or right. A small vertical marker shows where it will land; release to drop it.
  4. Work from A to Z: drag the tab that should come first to the far left, then the next one, and so on. Dragging one tab shifts the others, so re-check the strip after each move.
  5. On the mobile app, press and hold a tab, then drag it along the strip. The strip scrolls as you drag toward the edge.
  6. Check the result and repeat for any tab in the wrong place. There is no undo for tab order, so fix mistakes by dragging back.

Method 2: Sort all tabs with Apps Script (many tabs, repeatable)

  1. On a computer, open the spreadsheet and confirm you are signed in with an account that can edit it.
  2. Go to Extensions > Apps Script. A new tab opens with the script editor bound to this spreadsheet.
  3. Delete the placeholder code in the editor and paste a short reordering script. The core logic is: read all sheets with SpreadsheetApp.getActiveSpreadsheet().getSheets(), collect each sheet's name, sort that list alphabetically, then call setActiveSheet() and moveActiveSheet(index) for each one in turn. Menu labels in the editor can differ slightly by version and region, but Extensions > Apps Script is the standard path.
  4. Name the project something obvious like "Sort Tabs" and save it with the save icon or Ctrl+S / Cmd+S.
  5. Click Run. The first time, Google asks you to authorize the script — review the permissions, choose your account and allow access. The script only needs permission to edit the current spreadsheet.
  6. Switch back to the spreadsheet tab. The tabs should now be in alphabetical order. Reload the page if the strip looks stale.
  7. To reuse it later, open Extensions > Apps Script and run it again, or keep the script and trigger it from the editor whenever the tab list changes.

If you would rather not write code, a middle path is to rename tabs with numeric prefixes (01, 02, 03) so the existing order is meaningful, then drag them once into that order. Prefixes also survive when new tabs are added, because you can see at a glance where a new sheet belongs.

Common Mistakes

  • Expecting a menu command. There is no Data > Sort for tabs; sorting rows and sorting tabs are separate things. Looking for it wastes time.
  • Sorting with Viewer access. If tabs will not move, check Share settings — you need edit rights.
  • Forgetting hidden sheets. Hidden tabs are skipped visually but still exist in the order. Unhide them (right-click a tab > Unhide sheet) before sorting so you can see the full list.
  • Assuming formulas break. They do not. Sheet references like Sheet2!A1 follow the tab, not its position.
  • Running a script without a copy. A reordering script is low-risk, but a copy costs seconds and protects against a typo in the code.
  • Sorting case-sensitively by accident. Mixed-case names like "budget" and "Budget" can land in unexpected spots depending on how the script compares strings; standardize capitalization first.

Tips

  • Keep a fixed naming convention — for example a category prefix plus a date — so alphabetical order is also logical order.
  • Use color on tabs to group related sheets, since color survives reordering.
  • If the tab strip is crowded, right-click any tab to see the full list, or click the list icon at the left of the strip.
  • For a workbook you sort often, save the script once and it stays attached to that file under Extensions.
  • Consider whether a single sheet with a filter would serve better than dozens of tabs; fewer tabs means less sorting.

Troubleshooting

  • Tabs will not drag. Confirm edit access, then reload the browser tab. In the mobile app, make sure you are not in a view-only preview.
  • The script errors on authorization. Close the dialog, click Run again and complete the consent flow. If your organization blocks Apps Script, ask your Workspace admin — this is a policy restriction, not a bug.
  • Nothing happens after Run. Check the execution log in the editor for an error line, and confirm the script is bound to the spreadsheet you are looking at, not a standalone script file.
  • Order looks wrong for some names. Check for leading spaces, numbers or inconsistent capitalization in tab names; clean them up and run again.
  • A collaborator's view still shows the old order. Ask them to reload; tab order syncs, but an open tab can hold a stale view.

Frequently Asked Questions

Can I sort tabs alphabetically without a script?

Only by dragging them into place manually. Google Sheets has no native sort-tabs command, and the mobile app offers no alternative beyond dragging.

Does sorting tabs affect my formulas?

No. Formulas reference sheet names, not positions, so they keep working after tabs move. Named ranges and cross-sheet references are also unaffected.

Will sorting tabs change the order for everyone?

Yes. Tab order is a property of the spreadsheet itself, so anyone with access sees the new order after reloading.

Can I sort only some tabs?

Not with a single action. Drag the ones you want into place, or adapt a script to reorder only sheets whose names match a pattern.

Does the Apps Script method work on a phone?

The Apps Script editor is a desktop browser tool. On mobile, use the drag method in the Sheets app instead.

Is there an undo for tab order?

No. Ctrl+Z undoes cell edits, not tab moves. Fix a wrong order by dragging tabs back, which is why a copy before bulk changes is sensible.