Sunday, November 4, 2018

How to Sort Data in Excel Spreadsheets (The Right Way)

How to Sort Data in Excel Spreadsheets (The Right Way)


So, you get handed an Excel spreadsheet with thousands of rows inside of it, and you realize the data is all out of order. You might need to sort it based on the names inside of a column, or by sorting data from large to small.
On the surface, sorting data is a simple task in Excel, and the app certainly makes simple sorting easy. However, there's much more power in how you can sort and reorder the data in your worksheets. Here are three Excel data sorting techniques you'll learn in this tutorial:
  1. Sort data simply with just a couple of clicks.
Sorting can be a very simple, two-click process to reorganize the data in your spreadsheet. Let's learn how.
In an Excel workbook, start off by clicking in a cell of the column you want to sort. Now, make sure that you're on the Home tab of Excel's ribbon, and find the Sort and Filter button on the far right side of it.
Sort  Filter in Excel
The Sort & Filter button lives on the far right side of the Home tab on the ribbon.
Notice that in the sort options, you can sort text "A to Z", or "Z to A." These simple options will alphabetically sort the Excel data either direction, depending on the option you choose.
When you are sorting data in Excel, the entire row is being sorted. Essentially, the column you select will be the "key" that Excel uses that to decide how to sort the data, but each row is a record that should stay grouped together.
Depending on the data you've selected, you can sort alphabetically or numerically. If your column has numerical values, you can sort from smallest to largest amounts, while text data will sort based on alphabetical order.
Sort numerically in Excel
In the example above, the sort options have changed because I've selected a column with numbers.
It really is this easy to perform a basic sort. Simply click inside of a column of data, choose a sort option, and Excel will reorder the data inside a spreadsheet.
So far, a simple sort has allowed us to sort for a single type of data. What if we want to consider two types of data in our sorting?
What if we wanted to...
  • Sort alphabetically by the state, and then by the county in a spreadsheet.
  • Sort alphabetically by the name of a client, and then by each type of project we did for them.
  • Sort our clients in a list alphabetically, and then by amount for each individual project, from largest to smallest.
The answer to all of these is an advanced sort, where you can set multiple levels of sorting data. Let's walk through that last example using the sample data.
To get started, click somewhere inside of your data and find the Sort & Filter option, and then choose Custom Sort.
Custom Sort in Excel
Access advanced sorting options by choosing Sort & Filter > Custom Sort.
On this window, we can add multiple levels of sorting. Start off by clicking on the dropdown option next to Sort by and choose a column that you want to sort by.
Custom sort window in Excel
In my case, I'll choose Client from the dropdown menu, and leave the the Sort On set to Values, and Order set to A to Z. In plain English, this will sort the Excel spreadsheet based on alphabetical order.
Now, let's click on Add Level. This will create a new row in the sort options and allows us to add a second level of organization.
I can now choose Amount billed from the second dropdown. The combination of these two rules will start by sorting based on the client name, and then by the amount billed on each project.
Two levels of Excel spreadsheet sorting
You could continue to add as many levels as you want to this advanced sorting window. The sequence of the rows matters; you can move a row up to sort first by the amount billed, for example, and then by client.
Once we press OK, Excel will sort the spreadsheet based upon the rules we've built in this window.

No comments:

Post a Comment