To use the Excel SORT function, you first need to write a formula like this into a cell: SORT(range, index, order). This will sort your data without disturbing the original.
Sometimes, you’ll need more flexibility with your data than Excel offers in its sorting tool. We’re going to show you how to use the Excel SORT function, with helpful examples that will help you achieve your goals.
If you ever want to manipulate the data without disturbing the original data set, Excel’s SORT feature is a great option. However, if you just want them sorted in place, sorting should be an alternative for you.
Table of Contents
Excel is well known for its advanced formulas, such as the SORT formula. This has been a critical aspect of Excel for a number of years now, but in order for it to work properly, you have to put it in place correctly.
Use the Excel SORT Function
The Excel SORT formula allows you to sort data in ascending order easily.
The syntax for an Excel sort formula consists of the SORT() function, followed by one or more arguments. Only the first argument is required.
To use the optional arguments, simply add the #args= or #arg= to your text.
Index: Enter a number to represent the row or column to sort by. Excel sorts by row 1 and column 1, and then any consecutive contiguous ascending order.
When you order results by descending, it’s the default option. Enter 1 if you want to ascend instead, or -1 if you’d like to descend.
By_column will help you make sense of the data. Enter False to sort by row, which is the default if omitted, or True to sort by column. This determines the direction of the sort.
Now, let’s consider how the SORT function can be used in samples of Excel.
There are many ways to sort your data in Excel, and depending on the situation, using one of these sorting methods is the best idea. For example, if you want to create a list of the first five names alphabetically, then use A1:A5 to sort your data instead.
You can use the SORT function in Excel to sort a range or array. How this works is you’re not sorting your items in place but at the formula you enter.
Here are some ways to make your Excel spreadsheet easier to read.
To demonstrate how the sort formula works, we’ll simply sort the items in cells A2 through A6 using the defaults for the optional arguments.
The company assigns quality control specialists to each product, and we test them for quality. After that, some of the products are sent back to the manufacturer for correction.
For a single cell range, use the SORT function.
You now have the opportunity to see just how powerful our methods are right here with this microsite. Read up on what we can do for your business.
With this new sort function, you can now sort your data in a variety of ways!
As you can see, the ideas remain coupled with their attributes.
SORT function for a larger cell range
Now we’ll sort our range by the second column rather than the first. We’ll enter 2 for the index argument:
With this newsletter, you’ll never miss a new development in the productive world of tech again.
Get your daily dose of content without all the clutter with Category One News. Choose from a selection of different categories each day, and you’ll get everything from great articles, to news, to trivia in your inbox.
Email address
Sign Me Up!
Thank you for your interest in the AAMC. By clicking on “join”, you agree to be part of the AAMC and our terms of use. We’ll never share your email with any third party.
What is “SORT(A2:B6,2)”?
As you can see, our items are sorted in ascending order by the second column, with Green first and Yellow last.
Because of this, Microsoft Word is the only software to use the SORT function.
Advertisement
Next, we’ll sort our array by the order argument and include -1 at the end:
-1
Simply put, we left the index argument empty because Excel uses the first row and column by default. That’s what we wanted to happen.
Parentheses()
Once you enter a formula for any column, you can use the “Sort by” drop-down to sort in descending order, or ascending order.
A2:B6
Our data shows that the index argument is 2 and the order argument is -1. As expected, we see Green first and Yellow last.
The SORT function is used to determine the descending order in the second column.
For one final example, we’ll enter an array of four values for each argument so you can see how they all work together. We’ll also declare a large list of A2 through C6 like this:
Set A2: C6 in sort column as ‘Value’, then set Sort Destination to ‘AS Number’.
The Rating column sorts items by the date they were added to your wishlist, the Best Sellers column is a catalog of recommended products, and the Users Who Liked Them column includes recent recommendations by other users.
SORT function formula for all arguments.
To make data analysis easier, Excel provides a tool for sorting your data by different criteria. The SORT formula does just that, and it’s a handy tool to have when you’re analyzing your data.