Skip to content

How to Use Excel SORTBY Function?

Listen to this article.
SORTBY FunctionPin
SORTBY Function

We all know that Excel has various types of built-in formulas and functions. As per our need, we can use any of it. Sometimes, we want to sort the given range in the worksheet, doing this manually is a kind of difficult task if you have a large data. We suggest you use the SORTBY function in order to arrange them in ascending or descending order.

The SORTBY Function of Excel can return a sorted array by another independent array, and you can add levels of sorting. In this tutorial, we will see how to use the Excel SORTBY Function. Get an official version of MS Excel from the following link:

Excel SORTBY FunctionPin
Excel SORTBY Function

Definition of SORTBY Function

  • It is one of the built-in functions in Microsoft Excel.
  • This function will sort the values of the given array or range in ascending or descending order.


  • Here, you will see the syntax of the SORTBY function.
  • To apply this function on your spreadsheet, you must select a cell and enter the formula in the following format.
  • Once you enter the formula, click on the Enter button to get the result.


Syntax Explanation:

  • Array: This is the array that you want to sort.
  • Sorting_array1: This is the array by which you want to sort the array. The dimension of this array should be compatible with the array.
  • [order]: Optional. Set it to -1 if you want the order to be descending. By default, it is ascending(1).


Let’s look at some practical examples of the SORTBY Function and explore how to use it in Microsoft Excel.

  • Initially, you have to open your Excel workbook on your PC and launch the worksheet with data.
  • For instance, we have given a list of students’ name and their scores and we will sort them in ascending order.
Student ScoresPin
Student Scores
  • Then, you have to enter the formula in the cell as shown below to get the result.
Enter the formulaPin
Enter the formula
  • After entering the formula, you need to click the Enter button to get the output.


Hope you understood how to use the Excel SORTBY Function In Excel Office 365. Please feel free to state your query or feedback for the above article. To learn more about Excel functions, then visit our webpage

Video Tutorial

You can use the following video to know how to apply the Excel SORTBY function in the worksheet.

Read Ahead:


Leave a Reply

Your email address will not be published. Required fields are marked *

Share to...