In our last blog, we discussed the new Unique function in Excel. In this blog, we will discuss about the newly introduced Sort Function, which is also useful for analyzing large data sets. This function has been introduced in Microsoft Excel 365. It is not available in earlier versions of excel.
The Sort function helps sort a range or an array dynamically. The Sort feature available earlier helped sort data or ranges but was not a dynamic feature. In case of any change in data, the sorting had to be done again using the Sort feature. This is not the case with the new Sort function.
Sort Function Arguments
The Sort Function has 4 arguments.
Array :- It is the range or array to be sorted
Sort_Index :- It is the row or column in the dataset to be sorted. The input for this argument is a number.
Sort_Order :- It is the desired sort order. The input is a number. 1 represents Ascending order and -1 represents Descending Order.
By_Col :- In most cases, the values are sorted by the rows. The default value for this argument is “False”. So, if we do not enter anything for this argument, excel would sort the values by the rows in a selected column. If we want to sort the values by column (rare situations), we should enter “True” in the argument.
Let us understand the Sort Function with the help of a few examples.