where "data" is the named range B5:B14. The result is a new random sort order whenever the worksheet is recalculated.
The SORTBY function allows sorting based on one or more "sort by" arrays, as long long as they have dimensions that are compatible with the data being sorted. In this example, there are 10 values being sorted, the first 10 letters of the alphabet. To generate 10 random numbers to sort with, we are using the RANDARRAY function together with the COUNTA function like this:
This array is provided to the SORTBY function as the by_array1 argument. SORTBY uses the random values to sort the data, and returns the 10 letters into a spill range starting in D5.
Note: RANDARRAY is a volatile function and will recalculate every time the worksheet is changed, causing values to be resorted. To stop values from sorting automatically, you can copy the formulas, then use Paste Special > Values to convert formulas to static values.
The SORT function requires very little configuration. In the example shown, we want to sort data in B5:D14 by the third column, Group. For array, we provide entire range, B5:D14. For sort_index, we provide 3: = SORT ( B5:D14 , 3 ) With this formula...
In the example shown, we want to sort data in B5:D14 first by group in descending order. Here is the configuration needed: array = B5:D14 by_array1 = D5:D14 sort_order1 = 1 The formula below will sort data by group A-Z: = SORTBY ( B5:D14 , D5:D14 ,...
In this example, we are sorting a table with 10 rows and 3 columns. In the range J5:J7 (the named range "custom"), the colors "red", "blue", and "green" are listed in the desired sort order. The goal is to sort the table using values in the Group...
The Excel RANDARRAY function generates an array of random numbers between. The size or the array is is specified by rows and columns arguments. Generated values can be either decimals or whole numbers.
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.