20.5 C
London
Monday, June 2, 2025
HomeSoftware TutorialsExcelHow to Sort by Multiple Columns in Excel

How to Sort by Multiple Columns in Excel

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

Often you may want to sort by multiple columns in Excel. Fortunately this is easy to do using the Custom Sort option.

This tutorial provides a step-by-step example of how to use custom sort in practice.

Step 1: Create the Data

First, let’s create a fake dataset to work with:

Step 2: Sort by Multiple Columns

Next, we will sort the data in the following manner:

  • First, sort by Household Size from largest to smallest.
  • Next, sort by Last Name from A to Z.

To do this, highlight each of the columns including the headers:

Next, click the Sort & Filter option within the Editing section of the Home tab. In the dropdown menu, click Custom Sort.

In the window that appears, sort by Household Size and choose Largest to Smallest.

Then, click Add Level in the top left corner and sort by Last Name and choose A to Z.

Sort by multiple columns in Excel

Once you click OK, the data will automatically be sorted:

Multiple column sort in Excel

Notice that the rows are sorted by Household Size from largest to smallest, which is why the household with a size 7 appears first.

Next, we sort by Last Name from A to Z. This means for any households that have the same size, we determine their order by sorting from A to Z.

For example, each of the households that have a size of 4 are sorted from A to Z:

Note that in this example we sorted by two columns, but using the Custom Sort option you can sort by as many columns as you’d like.

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories