How to sort multiple columns in excel
Tutor 5 (22 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To sort multiple columns in Excel, you use the Custom Sort feature. This allows arranging data in a specific order based on more than one column simultaneously.
Steps to Sort Multiple Columns
-
Select the Data
Highlight the entire range of data you want to sort. Include all the columns that are part of the dataset to prevent misalignment. -
Open the Sort Dialog Box
-
On Windows: Go to the Data tab → Click Sort.
-
On Mac: Go to the Data menu → Select Sort → Click Sort….
-
-
Add Levels for Sorting
-
Click Add Level to include additional columns for sorting.
-
The first level is the primary sort. For example, if sorting by Department, this will group all rows with the same department together.
-
The second level sorts within the first. For instance, within each department, you can sort by Employee Name alphabetically.
-
You can add more levels as needed for further granularity.
-
-
Choose Sort Order
-
Under Column, select the column to sort.
-
Under Sort On, choose Values (most common), Cell Color, Font Color, or Conditional Formatting Icon.
-
Under Order, select A to Z, Z to A, Smallest to Largest, or Largest to Smallest.
-
-
Apply the Sort
Click OK to apply the multi-level sort. The data rearranges according to the defined hierarchy.
Example
Suppose you have a dataset with columns: Department, Job Title, and Salary. To organize the data:
-
Primary sort by Department (A → Z).
-
Secondary sort by Job Title (A → Z) within each department.
-
Tertiary sort by Salary (Largest → Smallest) within each job title group.
This will group employees by department, arrange their job titles alphabetically, and order salaries from highest to lowest within each job title.
Tips
-
Ensure the data has headers. Excel uses headers to identify columns in the sort dialog.
-
Use Ctrl + Z to undo the sort if the results are not as expected.
-
Avoid selecting only a single column unless the dataset is independent, as it may misalign rows.
This method maintains the integrity of the dataset while enabling complex sorting across multiple columns.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to sort by highlighted cells in excel
Answers · 1
How to sort excel by column and keep rows together
Answers · 1
How to sort by time in excel
Answers · 1
How to sort alphabetically in excel by last name
Answers · 1