Startseite » Excel EN » How to Sort in Excel – Quick Guide for Windows, macOS & Ubuntu

How to Sort in Excel – Quick Guide for Windows, macOS & Ubuntu

If you’re working with any spreadsheet, one of the most useful features is knowing how to sort in Excel. Sorting helps you organize rows based on values in a column—either alphabetically, numerically, or even by cell color. Whether you’re on Windows, macOS, or Ubuntu/Linux, Excel and its alternatives make sorting easy with both menu options and keyboard shortcuts.


🧮 Why Sort in Excel?

Sorting helps:

  • Organize data for better readability
  • Prepare spreadsheets for reporting or printing
  • Compare values easily
  • Group and analyze categories or totals

✅ Method 1: Sort with Excel’s Data Menu (All Systems)

  1. Select a cell in the column you want to sort.
  2. Go to the Data tab.
  3. Click Sort A to Z (ascending) or Sort Z to A (descending).

This rearranges entire rows based on the selected column’s values.

🟢 This method works in:

  • Excel for Windows
  • Excel for macOS
  • LibreOffice Calc on Ubuntu/Linux

⌨️ Keyboard Shortcuts to Sort in Excel

🪟 On Windows (Excel)

  • Alt + A + S + A → Sort ascending
  • Alt + A + S + D → Sort descending
  • Alt + D + S → Open custom Sort dialog box

🍎 On macOS

There is no built-in one-stroke shortcut, but:

  • Use Cmd + Shift + R (for some Excel versions)
  • Or go to Data > Sort manually

🐧 On Ubuntu (LibreOffice Calc)

  • Ctrl + Shift + ↑ → Sort ascending
  • Ctrl + Shift + ↓ → Sort descending
  • Or go to Data > Sort

📋 Keyboard Shortcut Recap Table

ActionWindows ExcelmacOS ExcelUbuntu LibreOffice Calc
Sort AscendingAlt + A + S + ACmd + Shift + R (if supported)Ctrl + Shift + ↑
Sort DescendingAlt + A + S + DCmd + Shift + R (if supported)Ctrl + Shift + ↓
Open Sort DialogAlt + D + SMenu navigationData > Sort

🧠 Method 2: Custom Sorting

If you need to sort by:

  • Multiple columns
  • Custom order (e.g., Jan, Feb, Mar)
  • Cell color or font color

Here’s how:

  1. Go to Data > Sort
  2. Click Add Level (for multi-column sorting)
  3. Choose Sort by column, then select Order
  4. Click OK

📝 Works best in Excel for Windows and macOS. In LibreOffice, use Tools > Options > LibreOffice Calc > Sort Lists to define custom orders.


📎 Tip: Sort Data with Headers

If your table has headers:

  • Excel usually detects this and checks “My data has headers”
  • If it doesn’t, check the box manually in the Sort dialog

⚠️ Sorting Gotchas to Avoid

  • Don’t sort only one column unless you’re 100% sure. It can misalign data.
  • Merged cells can prevent sorting—split them first.
  • Hidden rows won’t get sorted—unhide to include them.

❓ Frequently Asked Questions

Can I sort rows instead of columns?
Yes! In the Sort dialog, click Options > Sort left to right.

Can I undo a sort?
Absolutely. Just press Ctrl + Z (Windows/Linux) or Cmd + Z (macOS).

Does Excel Online support sorting?
Yes, but keyboard shortcuts are limited. Use the ribbon instead.

What about sorting numbers stored as text?
Convert them to number format first to sort them properly.


✅ Conclusion

Mastering how to sort in Excel is a core skill for managing and analyzing data. Whether you’re using Windows, macOS, or Ubuntu, sorting with menus or keyboard shortcuts can help you organize any spreadsheet quickly and effectively.

Complete List of Windows Keyboard Shortcuts

If you need help for Windows, you can find a whole list of all keyboard shortcuts here.

https://keyboard-shortcuts.org/

Advertisment