Excel Tutorial
Excel tutorials, quizzes & AI guides — all levels
RSS
  • Online Excel Exercises
  • Training
  • Excel Tests
  • Sitemap
  • Premium Quizzes
  • Shop
  • My account

Learn the secrets of Sorting Data with Excel

Excel Tutorial
Reading time: 4 minutes
Views: 4,672

Sort your data

To make your data easier to read, Excel has a very effective sorting tool in the Data tab.

Sort Menu

Consider the following table:

Fruits Sales

We want to sort this table by Country in ascending order.

  1. Select one of the cells in the column you want to sort (not necessarily the header)
  2. Click the A-Z icon to sort in ascending order
Sort data increasing order

Now we want to sort the Total column in descending order.

  1. Select one of the cells in the Total column
  2. Select the Data tab
  3. Click the Z-A icon
Sort the Total in Decreasing order

Sort across multiple columns

In Excel, you can sort on as many columns as you want, up to a limit of 256. For example, we want to sort the following table by Product and Date.

Sort on multi columns

To sort on two or more columns, open the sorting options dialog box from the ribbon.

Open the sort option

To sort on several columns, proceed as follows:

  1. Check that the Header option is checked
  2. Specify the first sort column: Fruit
  3. Click the Add Level button
  4. Specify the second sort key: Date
Sort on Multi columns

Sort on colors

In Excel, it’s common to highlight cells with colors that matter to you. Using the sorting tool, you can then sort columns by color.

Sort on colors
  1. From the sort dialog box, you can specify that you want to sort on a color
Sort select the option cell colors
  1. Then you’ll choose one color. The dialog box shows you all the colors used in the column.
Select the color to do the sort
  1. Add a new Level
  2. Repeat the same steps for another color
Select the second color to sort

The result is as follows. Note that only colors are sorted and not column values.

To sort on two colors in the same column, you need to create a sort key on that same column.

Sort on two different colors

This gives the following result:

Result of the sort on the colors

Spot the sort option

Look at the result below. As we saw above, sorting by color only reorders the colors themselves — it doesn’t touch the other column values. Can you tell which sort option produced this result?

Question sort options on color

Sort with column header arrows

There is another way to sort your data: using the options in Filter (next section).

To add the sort or filter arrows to your column headers, you can either:

  • Use the key combination Ctrl + Shift + L
  • Click the Data icon > Filter
Icon to add arrows in the headers

This adds arrows to each column header.

Filter and Sort options

Click the arrow on one of the headers to find the same sorting options we saw earlier (ascending order, descending order, and sorting by color).

Sort option from the headers

CAUTION: sorting on several columns from the arrows is impossible. Only one column can be sorted.

Wrap-up

You now have the full sorting toolkit in Excel: quick ascending/descending sorts, multi-column sorting with the dialog box, sorting by color, and the fast (but single-column) header arrows.

Continue learning

Keep building your Excel skills with the rest of this tutorial series:

  • Tutorial – Excel keywords
  • Tutorial – Adjusting the Size of rows and columns
  • Tutorial – How to make calculations in Excel
  • Tricks to Insert, Delete, Hide Rows and Columns
  • Tutorial – All Excel tricks to Copy-Paste
  • Tutorial – Moving cells or columns with the mouse
  • Tutorial – The Numbers Format
  • Tutorial – Excel Alignment text tips
  • Excel Tutorial – Filtering your data
  • Manipulate Text in Excel without formula
  • Excel Tutorial – Creating a dropdown menu
  • Learn how to use the SUM function in Excel
  • Tutorial for the Excel Functions AVERAGE, MIN, and MAX
  • Learn how to use the Dollars in an Excel formula

Frédéric LE GUEN

SORT, training, tutorial

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Viewed Posts

  • Displaying Negative Numbers in Parentheses in Excel (310,065)
  • Top 10 Excel Functions You Must Know (232,001)
  • How to make automatic calendar in Excel (212,775)
  • Dash for a zero in Excel automatically (190,812)
  • Converting a Date from YYYYMMDD to DD/MM/YYYY in Excel (171,033)
image excel exercises
Excel Exercises
image excel quizzes
Excel Quizzes

Learn the secrets of Sorting Data with Excel

Reading time: 4 minutes
Views: 4,672

Sort your data

To make your data easier to read, Excel has a very effective sorting tool in the Data tab.

Sort Menu

Consider the following table:

Fruits Sales

We want to sort this table by Country in ascending order.

  1. Select one of the cells in the column you want to sort (not necessarily the header)
  2. Click the A-Z icon to sort in ascending order
Sort data increasing order

Now we want to sort the Total column in descending order.

  1. Select one of the cells in the Total column
  2. Select the Data tab
  3. Click the Z-A icon
Sort the Total in Decreasing order

Sort across multiple columns

In Excel, you can sort on as many columns as you want, up to a limit of 256. For example, we want to sort the following table by Product and Date.

Sort on multi columns

To sort on two or more columns, open the sorting options dialog box from the ribbon.

Open the sort option

To sort on several columns, proceed as follows:

  1. Check that the Header option is checked
  2. Specify the first sort column: Fruit
  3. Click the Add Level button
  4. Specify the second sort key: Date
Sort on Multi columns

Sort on colors

In Excel, it’s common to highlight cells with colors that matter to you. Using the sorting tool, you can then sort columns by color.

Sort on colors
  1. From the sort dialog box, you can specify that you want to sort on a color
Sort select the option cell colors
  1. Then you’ll choose one color. The dialog box shows you all the colors used in the column.
Select the color to do the sort
  1. Add a new Level
  2. Repeat the same steps for another color
Select the second color to sort

The result is as follows. Note that only colors are sorted and not column values.

To sort on two colors in the same column, you need to create a sort key on that same column.

Sort on two different colors

This gives the following result:

Result of the sort on the colors

Spot the sort option

Look at the result below. As we saw above, sorting by color only reorders the colors themselves — it doesn’t touch the other column values. Can you tell which sort option produced this result?

Question sort options on color

Sort with column header arrows

There is another way to sort your data: using the options in Filter (next section).

To add the sort or filter arrows to your column headers, you can either:

  • Use the key combination Ctrl + Shift + L
  • Click the Data icon > Filter
Icon to add arrows in the headers

This adds arrows to each column header.

Filter and Sort options

Click the arrow on one of the headers to find the same sorting options we saw earlier (ascending order, descending order, and sorting by color).

Sort option from the headers

CAUTION: sorting on several columns from the arrows is impossible. Only one column can be sorted.

Wrap-up

You now have the full sorting toolkit in Excel: quick ascending/descending sorts, multi-column sorting with the dialog box, sorting by color, and the fast (but single-column) header arrows.

Continue learning

Keep building your Excel skills with the rest of this tutorial series:

  • Tutorial – Excel keywords
  • Tutorial – Adjusting the Size of rows and columns
  • Tutorial – How to make calculations in Excel
  • Tricks to Insert, Delete, Hide Rows and Columns
  • Tutorial – All Excel tricks to Copy-Paste
  • Tutorial – Moving cells or columns with the mouse
  • Tutorial – The Numbers Format
  • Tutorial – Excel Alignment text tips
  • Excel Tutorial – Filtering your data
  • Manipulate Text in Excel without formula
  • Excel Tutorial – Creating a dropdown menu
  • Learn how to use the SUM function in Excel
  • Tutorial for the Excel Functions AVERAGE, MIN, and MAX
  • Learn how to use the Dollars in an Excel formula
Tags: SORTtrainingtutorial

Frédéric LE GUEN

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net