Skip to main content

How to Sort Data in Excel

 - Section three of this course is really all about charts. Later, you'll see how to create a variety of charts and chart styles with Excel. Microsoft have really revamped chart creation from Excel 2007 onwards. If you've ever used previous versions of the software, you'll appreciate how easy it is to produce impressive results.
First, though, we'll tackle the subject of how to sort data. The two subjects are not really related, but the data going in to our charts is a good opportunity to learn about this important topic.

 

Sorting Data in Excel 2007 to 2016

To make a start, you need to create the spreadsheet below. You don't need to use the same colours as ours, but reproduce the data and the headings exactly as they are in this one:
The Data to Sort in Excel 2007
Our spreadsheet is all about the viewing figures for the two main TV channels in the UK. The data is a bit old, but that's not important. As long as we have some nice information to sort, that's what matters.
The viewing figures for ITV have been sorted, from the highest first to the lowest last. The BBC1 figures are still waiting to be sorted. Let's see how to do that now.

Descending Sort in Excel 2007 to 2016

We want to sort the BBC1 viewing figures in the same way that the ITV figures have been sorted. We'll put the highest programme first and the lowest last. This is called a Descending Sort. If you do it the other way round, it's known as an Ascending Sort.
The first thing to do is to highlight the information that you want to sort. In your spreadsheet, highlight cells A5 to B14. The crucial thing to remember when you want to sort data in Excel is to include the text as well as the numbers. If you don't, you'll end up with a spreadsheet where the numbers don't relate to the information, which could spell disaster in bigger spreadsheets!
Your highlighted spreadsheet, though, should look like this one:
Select the Data to Sort
To sort your BBC 1 viewing figures, do the following:
  • From the Excel tabs at the top of the screen, click Data:
The Data Panel in Excel 2007
  • From the Sort & Filter panel, click Sort
  • A dialogue box appears:
The Sort dialogue box in Excel
The Sort By drop-down list seems empty. Click the down arrow to reveal the columns you selected:
The Sort-By drop down list
We want to sort this by the values in the Millions column. So select Millions from the Sort by list.
Sort On is OK for us - it has Values. But click to see the options in the drop down list:
The Sort-On options
Values is the one you'll use the most. Once we have a Sort By and Sort On option selected, we can then move on to the Order.
Click the down arrow to see the options on the Order list:
The Sort Order options
Select Largest to Smallest. Your Sort dialogue box should then look like this:
What your Sort dialogue box should look like
If you clicked OK, your data would be sorted. But the level buttons at the top can come in handy. If two items in your data have the same numbers, then you can specify what to sort by next. For example, if we have two programmes that have 6.3 million viewers, we could specify that the names of the programmes be sorted alphabetically.
To do this, click the Add Level button, and you'll see some additional choices appear. You'll see the same lists as the Sort By box. If you select Column A, and then Descending, Excel will do an alphabetical sort if two items have the same viewing figures.
Additional sort options in Excel
In the image above, we've added a "Then By" part, just in case there is a tie. You don't have to do this, as we have no numbers that are the same. Click OK to sort your data, though.
If everything went well, your sorted data should look like this:
The sorted data


But that's all we need to do for the sort. You can move on to creating your first chart in Excel.


Comments

Popular posts from this blog

Beginners PHP  -This is a complete and free PHP programming course for beginners. It's assumed that you already have some HTML skills. But you don't need to be a guru, by any means. If you need a refresher on HTML, then click the link for the Web Design course on the left of this page. Everything you need to get started with this PHP course is set out in section one below. Good luck! Home Page > PHP Section One - An Introduction to PHP 1. What is PHP and Why do I need it? 2. What you need to get started 3. Installing and testing Wampserver 4. Troubleshooting > PHP Two - Getting Started With Variables 1. What is a Variable? 2. Putting text into variables 3. Variables - some practice 4. More variable practice 5. Joining direct text and variable data 6. Adding up in PHP 7. Subtraction 8. Multiplication 9. Division 10. Floating point numbers > PHP Three - Conditional Logic 1. If Statements 2. Using If Statements 3....
Visual Basic .NET Contents Page   -This computer course is an introduction to Visual Basic.NET programming for beginners. This course assumes that you have no programming experience whatsoever. It's a lot easier than you think, and can be a very rewarding hobby! You don't need to buy any software for this course! You can use the new FREE Visual Basic Express Edition from Microsoft. To see which version you need, click below: Getting the free Visual Studio Express - Which version do I need? > VB .NET One - Getting Started   1. Getting started with VB.NET 2. Visual Basic .NET Forms 3. Adding Controls using the Toolbox Home Page 4. Adding a Textbox to the Form 5. Visual Basic .NET and Properties 6. The Text Property 7. Adding a splash of colour 8. Saving your work 9. Create a New Project >   VB .NET Two - Write your first .NET code   1. What is a Variable? 2. Add a coding button to the Form 3. Writing y...
The Excel SumIF Function  - Another useful Excel function is SumIF. This function is like CountIf, except it adds one more argument: SUMIF( range ,  criteria ,  sum_range ) Range and criteria are the same as with  CountIF  - the range of cells to search, and what you want Excel to look for. The Sum_Range is like range, but it searches a new range of cells. To clarify all that, here's what we'll use SumIF for. (Start a new spreadsheet for this.) Five people have ordered goods from us. Some have paid us, but some haven't. The five people are Elisa, Kelly, Steven, Euan, and Holly. We'll use SumIF to calculate how much in total has been paid to us, and how much is still owed. So in Column A, enter the names: In Column B enter how much each person owes: In Column C, enter TRUE or FALSE values. TRUE means they have paid up, and FALSE means they haven't: Add two more labels: Total Paid, and Still Owed. Your spreadsheet should look something li...