Multi-Level Sorting in Excel: Sort by Multiple Columns

July 14, 2026

Multi-Level Sorting in Excel: Sort by Multiple Columns

Simple one-column sorting handles most cases, but sometimes you need to sort by multiple criteria — first sort by region, then by salesperson within each region, then by sales amount within each salesperson. Multi-level sorting makes this easy.

Opening the Sort Dialog

Go to the Data tab and click the Sort button (not the A-Z or Z-A buttons). This opens the full Sort dialog where you can define multiple sort levels.

Setting Up Multiple Sort Levels

  1. In the Sort dialog, set your primary sort: choose the column, sort on Cell Values, and order (A to Z, Z to A, smallest to largest, etc.).
  2. Click Add Level.
  3. Set your secondary sort: choose a different column. This determines how rows are ordered when the primary sort column has ties.
  4. Add more levels if needed — Excel supports up to 64 sort levels.
  5. Click OK.

Example: Sort by Department, Then by Last Name

Level 1: Sort by Department, A to Z. This groups all employees by department. Level 2: Sort by Last Name, A to Z. Within each department, employees are listed alphabetically. The result is a clean, organized directory sorted exactly the way you want it.

Sort Order Matters

The order of levels is critical. The first level is the primary sort — it takes precedence over everything else. Subsequent levels only apply within groups where the previous level has ties. Think of it as sorting within a sort within a sort.

Custom Sort Orders

For columns with non-alphabetical sequences (like months — January, February, March rather than alphabetical order), click the Order dropdown and choose Custom List. Select the built-in month or day list, or create your own custom sequence for any domain-specific ordering.

My Data Has Headers

Always make sure the My data has headers checkbox is checked in the Sort dialog. This prevents Excel from sorting your header row into the data, which would mix your column labels in with the records.

Back to Blog