Excel 2016 - Sorting Data PDF
Excel 2016 - Sorting Data PDF
Excel 2016
Sorting Data
Introduction
As you add more content to a worksheet, organizing this information becomes
especially important. You can quickly reorganize a worksheet by sorting your data. For
example, you could organize a list of contact information by last name. Content can be
sorted alphabetically, numerically, and in many other ways.
Watch the video below to learn more about sorting data in Excel.
Types of sorting
When sorting data, it's important to first decide if you want the sort to apply to the
entire worksheet or just a cell range.
▶ Sort sheet organizes all of the data in your worksheet by one column.
Related information across each row is kept together when the sort is
applied. In the example below, the Contact Name column (column A) has
been sorted to display the names in alphabetical order.
https://edu.gcfglobal.org/en/excel2016/sorting-data/1/ 1/10
3/3/2020 Excel 2016: Sorting Data
▶ Sort range sorts the data in a range of cells, which can be helpful when
working with a sheet that contains several tables. Sorting a range will not
a ect other content on the worksheet.
To sort a sheet:
In our example, we'll sort a T-shirt order form alphabetically by Last Name (column C).
1 Select a cell in the column you want to sort by. In our example, we'll select
cell C2.
2 Select the Data tab on the Ribbon, then click the A-Z command to sort A to
Z, or the Z-A command to sort Z to A. In our example, we'll sort A to Z.
https://edu.gcfglobal.org/en/excel2016/sorting-data/1/ 2/10
3/3/2020 Excel 2016: Sorting Data
3 The worksheet will be sorted by the selected column. In our example, the
worksheet is now sorted by last name.
To sort a range:
In our example, we'll select a separate table in our T-shirt order form to sort the number
of shirts that were ordered on di erent dates.
1 Select the cell range you want to sort. In our example, we'll select cell
range G2:H6.
2 Select the Data tab on the Ribbon, then click the Sort command.
3 The Sort dialog box will appear. Choose the column you want to sort by. In
our example, we want to sort the data by the number of T-shirt orders, so
we'll select Orders.
https://edu.gcfglobal.org/en/excel2016/sorting-data/1/ 3/10
3/3/2020 Excel 2016: Sorting Data
6 The cell range will be sorted by the selected column. In our example, the
Orders column will be sorted from highest to lowest. Notice that the other
content in the worksheet was not a ected by the sort.
If your data isn't sorting properly, double-check your cell values to make
sure they are entered into the worksheet correctly. Even a small typo could
cause problems when sorting a large worksheet. In the example below, we
forgot to include a hyphen in cell A18, causing our sort to be slightly
inaccurate.
https://edu.gcfglobal.org/en/excel2016/sorting-data/1/ 4/10
3/3/2020 Excel 2016: Sorting Data
Custom sorting
Sometimes you may find that the default sorting options can't sort data in the order you
need. Fortunately, Excel allows you to create a custom list to define your own sorting
order.
1 Select a cell in the column you want to sort by. In our example, we'll select
cell D2.
3 The Sort dialog box will appear. Select the column you want to sort by,
then choose Custom List... from the Order field. In our example, we will
choose to sort by T-Shirt Size.
4 The Custom Lists dialog box will appear. Select NEW LIST from the Custom
Lists: box.
https://edu.gcfglobal.org/en/excel2016/sorting-data/1/ 5/10
3/3/2020 Excel 2016: Sorting Data
5 Type the items in the desired custom order in the List entries: box. In our
example, we want to sort our data by T-shirt size from smallest to largest,
so we'll type Small, Medium, Large, and X-Large, pressing Enter on the
keyboard a er each item.
6 Click Add to save the new sort order. The new list will be added to the
Custom lists: box. Make sure the new list is selected, then click OK.
7 The Custom Lists dialog box will close. Click OK in the Sort dialog box to
perform the custom sort.
8 The worksheet will be sorted by the custom order. In our example, the
worksheet is now organized by T-shirt size from smallest to largest.
https://edu.gcfglobal.org/en/excel2016/sorting-data/1/ 6/10
3/3/2020 Excel 2016: Sorting Data
Sorting levels
If you need more control over how your data is sorted, you can add multiple levels to
any sort. This allows you to sort your data by more than one column.
To add a level:
In our example below, we'll sort the worksheet by T-Shirt Size (Column D), and then by
Homeroom Number (column A).
1 Select a cell in the column you want to sort by. In our example, we'll select
cell A2.
https://edu.gcfglobal.org/en/excel2016/sorting-data/1/ 7/10
3/3/2020 Excel 2016: Sorting Data
3 The Sort dialog box will appear. Select the first column you want to sort by.
In this example, we will sort by T-Shirt Size (column D) with the custom list
we previously created for the Order field.
5 Select the next column you want to sort by, then click OK. In our example,
we'll sort by Homeroom # (column A).
https://edu.gcfglobal.org/en/excel2016/sorting-data/1/ 8/10
3/3/2020 Excel 2016: Sorting Data
If you need to change the order of a multilevel sort, it's easy to control
which column is sorted first. Simply select the desired column, then click
the Move Up or Move Down arrow to adjust its priority.
Challenge!
1 Open our practice workbook.
3 For the main table, create a custom sort that sorts by Grade from Smallest
to Largest and then by Camper Name from A to Z.
https://edu.gcfglobal.org/en/excel2016/sorting-data/1/ 9/10
3/3/2020 Excel 2016: Sorting Data
https://edu.gcfglobal.org/en/excel2016/sorting-data/1/ 10/10