Return Random Value from List in Excel

Two Functions to Make Returning Random Data Easy

Using the pwrRANDFROMSET and pwrRANDFROMRANGE functions it’s easy to get a random value back to your formula.

Random Values from a Set

The pwrRANDFROMSET function returns a value from a set defined within the function while the pwrRANDFROMRANGE function returns a value from a defined range in Excel.

If you wanted to return a random value from a set of colors you can use the equation below as an example.

=pwrRANDFROMSET("red", "pink", "green", "blue", "black", "orange", "yellow")

This will return a random value from the set of colors in the formula.

Random Values from a Range

The pwrRANDFROMRANGE function returns a value from a range of cells. This range can be multiple columns and rows as long as they are contiguous.

Imagine you have data arranged in cells A1:B4 as follows.

red     pink
green   blue
black   orange
yellow

You can use the following formula to return one of the values randomly.

=pwrRANDFROMRANGE(A1:B4)

This will return a random value from the set of colors references in the formula.
 

Leave a Reply

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