How to Use the Sort Function in Excel 2007
Suppose you have a long list of addresses that you typed into Excel and you want to sort the information by last name so you can locate certain addresses more quickly. To sort by last name, select the column that contains the last names by clicking on the column header that contains that information. Then click on the DATA tab in the Excel 2007 Ribbon and select the SORT button (See Figure 1).
Immediately a window pops up warning you that you have data next to the cell that you intend to sort (see Figure 2). This is the one caveat when sorting in Excel 2007. Data in the rows of a spreadsheet are not considered to be related in any way. You see, spreadsheets are like two-dimensional databases. They are used for calculations and data manipulation, but data in Excel 2007 are not considered to be “cases" of related data. If you were to sort the column without selecting the data next to it, only the column would sort and the last names would no longer match up to their appropriate first names, addresses, cities, and zip codes. In the window that pops up, click EXPAND THE SELECTION and then click OK.
Another window opens and now you can select exactly how you want your data to sort (see Figure 3). Click on the arrow next to the SORT BY drop-down box and select the data by which you want to sort. In this example choose LAST NAME. Notice that in the ORDER drop-down box, A to Z is the default sort method. Click OK and your data fields are now sorted by last name. Notice also that the rest of the information correctly lines up with the last names. This is because we chose the entire selection of data and not just the one column.
This simple example should get you on your way to doing more complex sorting. You can even sort by cell color in case you have tagged cells with a certain kind of data or even by font color if you use black for positive values and red for negative values. Play around with the sort function and you will realize just how powerful this function is in Excel 2007.