The 10 random names are returned in a spill range beginning in cell D5.
In other words, there is no guarantee that RANDARRAY will return 10 unique numbers.
Finally, we need to retrieve 10 values.
INDEX then returns the first 10 names in aspill rangelike the original formula.
Note: for a more detailed explanation of random numbers without duplicates,see this example.
The range or array used to sort does not need to appear in results.
RANDARRAY Function
The Excel RANDARRAY function generates an array of random numbers between two values.
The size or the array is specified byrowsandcolumnsarguments.
The generated values can be either decimals or whole numbers.
COUNTA does not count empty cells.
SEQUENCE Function
The Excel SEQUENCE function generates a list of sequential numbers in an array.
The array can be one dimensional, or two-dimensional, determined byrowsandcolumnsarguments.