Sorting a data set helps answer a basic question data analysts like to ask: “Which ____ has the highest (or lowest) ______?”
Excel (and other spreadsheets such as the open source Calc) make sorting data easy. In fact, I often make sorting my first step when “interviewing” data because it quickly reveals high and low values and often highlights some that may seem questionable.
Let’s work through a simple sort in Excel. Start by downloading the file “sorting.xlsx” and saving it to your computer. Open it and follow along:
1. We have a table of Census data from the 2006-2008 American Community Survey. It shows the median age of the population for each of 79 school districts in Virginia plus the state itself.
We want to know which district has the oldest and youngest populations. Let’s sort it!
2. Click once on one cell anywhere in the table. This will help Excel auto-discover your table in the next step.
3. On the Excel ribbon, select the “Data” tab and click “Sort.”