# How to Use Excel 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:

https://www.microsoft.com/en-in/microsoft-365/excel

## 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.

## Syntax

• 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 button to get the result.

=SORTBY(array,sorting_array1,[order],…)

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).

## Example

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.
• Then, you have to enter the formula in the cell as shown below to get the result.
• After entering the formula, you need to click the  button to get the output.

## Wrap-Up

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 Aawexcel.com.

## Video Tutorial

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