Introduction
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.
To sort in alphabetical order:
- Select a cell in the column you want to sort by. In this example, we'll sort by Last Name.
- 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.
- The data in the spreadsheet will be organized alphabetically.
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.
- 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.
To sort by date or time:
- Select a cell in the column you want to sort by.
- 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.
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.
- 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. In this example, we'll choose T-Shirt Size.
- Make sure Values is selected in the Sort On field.
- Click the drop-down arrow in the Order field, then choose Custom List.
- Select NEW LIST, and enter how you want your data sorted in the List entries box. We'll sort T-shirt sizes from smallest to largest.
- Click Add to save the list, then click OK.
- Click OK to close the Sort dialog box and sort your data.
- The spreadsheet will be sorted in order of Small, Medium, Large, and X-Large.
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'll sort by 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.
- Click OK. The data is now sorted by attribute rather than text.
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 below, you could 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.
- Identify the item you want to sort by next. We will sort Last Name from A to Z.
- Click OK.
- The spreadsheet will be sorted so homeroom numbers are in order, and within each homeroom, that students are listed alphabetically by last name.
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 reorder.
- Use the Move Up or Move Down arrows. The higher the level is on the list, the higher its priority.
- Click OK.
Challenge!
- Open an existing Excel 2010 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, reorder the list to sort by T-Shirt Color (red), then by T-Shirt Color (grey), then by T-Shirt Size, then by Homeroom #.
No comments:
Post a Comment