Home » How to Sort by Multiple Columns in Excel

How to Sort by Multiple Columns in Excel

by Tutor Aspire

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.

You may also like