Google Sheets Sort Shortcut: Quick Steps to Sort Data
In this article
Google Sheets does not have a single built-in keyboard shortcut that opens the sort dialog or instantly sorts a column. The fastest reliable method is to select your data range and use the menu: Data > Sort range (or Sort sheet). For keyboard-only users, you can create a custom shortcut via Tools > Macros or use the Alt key menu navigation (on Windows) or Ctrl+Option (on Mac) to reach the Data menu. The steps below cover both the standard menu approach and how to set up a repeatable shortcut.
What You'll Need
- A Google account and access to Google Sheets (desktop browser recommended for full menu access).
- Data entered in a spreadsheet with a clear header row (optional but helpful for sorting).
- For custom shortcuts: edit access to the spreadsheet and permission to create macros (available in most personal and Workspace accounts).
Step-by-Step
- Open your spreadsheet in Google Sheets on a computer. The mobile app has limited sorting options and no keyboard shortcuts, so use a desktop browser for the full method.
- Select the data you want to sort. Click and drag to highlight the range, or click any cell inside the range and press Ctrl+A (Windows) or Cmd+A (Mac) to select the current data block. If your data has headers, include them in the selection.
- Open the Data menu. Click Data in the top menu bar. On Windows, you can also press Alt+D to open the Data menu; on Mac, press Ctrl+Option+D. Menu labels may vary slightly by version or region.
- Choose the sort option. For a selected range, click Sort range > Advanced range sorting options. For a whole sheet, click Sort sheet > Sort sheet by column A, Z to A (or another column). The sheet sort applies to all data in the sheet, not just the selection.
- Configure the sort dialog. In the Sort range dialog, check Data has header row if your first row contains column names. Then choose the column to sort by and select A to Z (ascending) or Z to A (descending). Click Sort.
- For a repeatable keyboard shortcut, create a macro. Go to Extensions > Macros > Record macro. Perform the sort steps above, then stop recording. Save the macro with a name and assign a keyboard shortcut (e.g., Ctrl+Alt+Shift+1). This shortcut will then run the recorded sort on the active range.
- Test your shortcut. Select a different range and press your assigned key combination. The macro will replay the recorded actions. Note that macros are stored per spreadsheet and may need re-authorization if shared.
Common Mistakes
- Sorting only part of a row. If you select a single column and sort, Sheets may ask whether to expand the selection. Always choose Expand selection to keep rows intact; otherwise, data becomes misaligned.
- Forgetting the header row. If you sort without marking the header, the header may be sorted into the data. Always check Data has header row in the sort dialog.
- Using the mobile app for complex sorts. The Sheets mobile app only offers basic sort options (A-Z, Z-A) and no custom shortcuts. Use a desktop browser for advanced sorting.
- Assuming a default shortcut exists. Google Sheets has no built-in shortcut for sorting. Rely on the menu or create a macro.
- Recording a macro that references a specific range. Macros record exact cell references. If you record a sort on A1:B10, the macro will always sort that range, not the currently selected one. For dynamic sorting, use Apps Script instead.
Tips
- Use Filter views (Data > Filter views) to sort without affecting other users in a shared sheet.
- To sort by multiple columns, use Sort range > Advanced range sorting options and add secondary sort columns.
- Press Ctrl+Z (Windows) or Cmd+Z (Mac) immediately if a sort goes wrong.
- For frequent sorting, consider using Apps Script to create a custom function that sorts the active range with one click.
- Keep a backup copy of your data before running macros or complex sorts.
Troubleshooting
- Sort option is greyed out: Ensure you have edit access to the sheet. If the sheet is protected, you may need to request access.
- Data gets mixed up after sorting: Undo immediately (Ctrl+Z). Then re-select the entire data range including headers and sort again, ensuring Expand selection is chosen if prompted.
- Macro shortcut does not work: Check that the macro is saved and authorized. Go to Extensions > Macros > Manage macros to verify the shortcut assignment. Macros may not work in shared sheets if the owner has not granted permission.
- Sort dialog does not appear: Make sure you are using a desktop browser. The mobile app has a simplified sort menu without the advanced dialog.
- Sorting changes formulas: Sorting moves cells, and relative references may adjust. Use absolute references ($A$1) if formulas should not change.
Frequently Asked Questions
Is there a default keyboard shortcut for sorting in Google Sheets?
No, Google Sheets does not have a built-in keyboard shortcut for sorting. You must use the Data menu or create a custom macro.
Can I sort using only the keyboard?
Yes, on Windows you can press Alt+D to open the Data menu, then use arrow keys to navigate to Sort range. On Mac, use Ctrl+Option+D. You can also assign a macro shortcut.
How do I sort a single column without affecting other columns?
Select the column, then choose Data > Sort range. When prompted, select Continue with current selection to sort only that column. Be aware this can misalign rows.
Why does my sort include the header row?
You likely did not check Data has header row in the sort dialog. Re-sort and enable that option.
Can I create a shortcut that sorts by a specific column every time?
Yes, record a macro that selects the range and sorts by that column. The macro will replay those exact steps. For dynamic ranges, use Apps Script.
Does sorting work in the Google Sheets mobile app?
The mobile app offers basic sort options (A-Z, Z-A) via the three-dot menu, but no custom shortcuts or advanced sort dialog.