Excel 2010
Sorting Data
Introduction
With more than 17 billion cells in a single worksheet, Excel 2010 gives you the ability to work with an enormous amount of data. Arranging your data alphabetically, from smallest to largest, or using other criteria can help you find the information you're looking for more quickly.
In this lesson, you will learn how to sort data to better view and organize the contents of your spreadsheet.
Basic sorting
Sorting is a common task that allows you to change or customize the order of your spreadsheet data. For example, you could organize an office birthday list by employee, birthdate, or department, making it easier to find what you're looking for. Custom sorting takes it a step further, giving you the ability to sort multiple levels, such as department first, then birthdate, to group birthdates by department.
To sort in alphabetical order:
- Select a cell in the column you want to sort by. In this example, we will sort by Last Name.
Selecting a column to sort
- Select the Data tab, then locate the Sort and Filter group.
- Click the ascending command to Sort A to Z or the descending command to Sort Z to A.
Sorting in ascending alphabetical order
- The data in the spreadsheet will be organized alphabetically.
Sorted by last name, from A to Z
Sorting options can also be found on the Home tab, condensed into the Sort & Filter command.
To sort in numerical order:
- Select a cell in the column you want to sort by.
Selecting a column to sort
- From the Data tab, click the ascending command to Sort Smallest to Largest or the descending command to Sort Largest to Smallest.
- The data in the spreadsheet will be organized numerically.
Sorted by homeroom number, from smallest to largest
To sort by date or time:
- Select a cell in the column you want to sort by.
Selecting a column to sort
- From the Data tab, click the ascending command to Sort Oldest to Newest or the descending command to Sort Newest to Oldest.
- The data in the spreadsheet will be organized by date or time.
Sorted by payment date, from oldest to newest
Custom sorting
To sort in the order of your choosing:
You can use a Custom List to identify your own sorting order, such as days of the week, or in this example, T-shirt sizes from smallest to largest (Small, Medium, Large, and X-Large).
- From the Data tab, click the Sort command to open the Sort dialog box.
Opening the Sort dialog box
- Identify the column you want to Sort by by clicking the drop-down arrow in the Column field. In this example, we will choose T-Shirt Size.
Selecting a column to sort by
- Make sure Values is selected in the Sort On field.
- Click the drop-down arrow in the Order field, then choose Custom List...
Choosing to order by Custom List
- Select NEW LIST, and enter how you want your data sorted in the List entries box. We will sort T-shirt sizes from smallest to largest.
- Click Add to save the list, then click OK.
Creating a custom list
- Click OK to close the Sort dialog box and sort your data.
Clicking OK to sort
- The spreadsheet will be sorted in order of Small, Medium, Large, and X-Large.
Sorted by t-shirt size, from smallest to largest
To sort by cell color, font color, or cell icon:
- From the Data tab, click the Sort command to open the Sort dialog box.
- Identify the column you want to Sort by by clicking the drop-down arrow in the Column field.
- Choose whether you want to sort by Cell Color, Font Color, or Cell Icon in the Sort On field. In this example, we will sort on Font Color.
Choosing to sort on Font Color
- In the Order field, click the drop-down arrow to choose a color, then decide whether you want it ordered On Top or On Bottom.
Selecting a font color
- Click OK. The data is now sorted by attribute rather than text.
Sorted by font color
Sorting multiple levels
Another feature of custom sorting, sorting multiple levels allows you to identify which columns to sort by and when, giving you more control over the organization of your data. For example, you could sort by more than one cell color (such as red, then yellow, then green, to indicate different levels of priority) or, as seen here, sort students by homeroom number, then by last name.
To add a level:
- From the Data tab, click the Sort command to open the Sort dialog box.
- Identify the first item you want to Sort by. In this example, we will sort Homeroom # from Smallest to Largest.
- Click Add Level to add another item.
Adding a level
- Identify the item you want to sort by next. We will sort Last Name from A to Z.
Choosing criteria for a second level
- Click OK.
- The spreadsheet will be sorted so homeroom numbers are in order, and within each homeroom, students are listed alphabetically by last name.
Sorted by multiple levels
Copy Level will add a level by duplicating the one you have selected and allowing you to modify the sorting criteria. This is useful if you need to sort multiple levels that share some criteria, such as the same Column, Sort On, or Order.
To change the sorting priority:
- From the Data tab, click the Sort command to open the Custom Sort dialog box.
- Select the level you want to re-order.
- Use the Move Up or Move Down arrows. The higher the level is on the list, the higher its priority.
Changing the sorting priority
- Click OK.
Challenge!
- Open an existing Excel workbook. If you want, you can use this example.
- Sort a column in ascending or descending order. If you are using the example, sort by Homeroom #.
- Add a second level, and sort it according to cell color, font color, or cell icon. If you are using the example, add a second and third level to sort by the red and grey fonts used in T-Shirt Color.
- Add another level, and sort it using a Custom List. If you are using the example, sort by T-Shirt Size in the order of Small, Medium, Large, and X-Large.
- Change the sorting priority. If you are using the example, re-order the list to sort by T-Shirt Color (red), then by T-Shirt Color (grey), then by T-Shirt Size, then by Homeroom #.