How to Use SORT Formula in Excel (4Example)

Welcome to Excel Avon

SORT Formula in Excel

The SORT function in Excel sorts the contents of an array or range by columns or rows in ascending or descending order. SORT returns a dynamic array of results. This formula was introduced in 2018 in MS Office 365.

Formula

=SORT (array, [sort_index], [sort_order], [by_col])

Argument

array – Range or array to sort.

sort_index – [optional] Column index to use for sorting. Default is 1.

sort_order – [optional] -1 = Descending, 1 = Ascending. Default is ascending order

by_col – [optional]  TRUE for sort by column, FALSE for sort by row. Default is FALSE.

How to use SORT Formula in Excel

DOWNLOAD USED EXCEL FILE FROM HERE>>

SORT BY ROW(Sort Ascending(A-Z))

As you can see we have an example to apply the SORT formula which is going to be done for Sort by Row, for Sort Ascending(A-Z). 

And as we have example data given name and total revenue and we will put it in Sort Ascending(A-Z).

SORT-FORMULA-IN-EXCEL-MS

Now we are going to apply SORT formula which will transform whole data into Sort Ascending (A TO Z).

=SORT(Table1,1,1,FALSE)

 SORT-FORMULA-IN-EXCEL-ARRAY

After applying the SORT formula we find the result name will be for sort ascending A TO Z.

SORT BY ROW (Sort Descending(Z-A))

Once again we are going to sort by row, the SORT formula will be done and as we have example data given name and total revenue and we will put it in sort ascending (A-Z).

SORT-FORMULA

Now we are going to apply SORT formula which will transform whole data into Sort Descending (Z TO A). Now we are going to apply the formula that will sort the whole data in descending order (Z to A). To use the formula, sort will first select the array which is the first table containing the data then for descending we will write – 1 or select descending.

=SORT(Table1,1,-1,FALSE)

For descending order I will Use -1, And the false will do it for the sort by row.

After using the SORT formula, we get the result something like this. Sort Descending(Z-A)

SORT BY COLUMNS (Sort Ascending(A-Z))

We have some data which is random means without any order and we have to sort by column so now we will use SORT formula and this data will be sorted by column A TO Z for ascending.

SORT-DESCENDING -ORDER-FORMULA

Now we are going to apply SORT formula which will transform whole data into Sort Ascending (A TO Z).

=SORT(C2:N3,1,1,TRUE)

For Ascending order I will Use 1, And the True will do it for the sort by column.

SORT-DESCENDING -ORDER-FORMULA

After applying the formula we find the result name will be for sort ascending A TO Z( Sort by column).

SORT-DESCENDING -ORDER-FORMULA

SORT BY COLUMNS (Sort descending(Z to A))

We have some data which is random means unordered and we have to sort by column so now we will use formula and this data will be sorted by column Z TO A descending.

sort-order-for-Descending-order

Now we are going to apply the formula which will convert the whole data in descending order (Z to A).To use the formula, the sort will first select the array which is the first table containing the data then for descending we will write -1 or select the descending.

=SORT(C2:N3,1,-1,TRUE)

I would use -1 for descending order, and True would sort it column wise.

sort-order-formula-in-excel

After applying the formula we find the result name will be for sort descending Z to A( Sort by column).

DOWNLOAD USED EXCEL FILE FROM HERE>>

Learn More formulas from here

So I hope you have understood this formula and for more information, you can follow us on Twitter, Instagram, LinkedIn, and YouTube as well.

You can also see well-explained video here

Leave a Reply