Quick Excel Lists with RANDARRAY Function – Examples

Quick Excel Lists with RANDARRAY Function - Examples

Use the Excel RANDARRAY function to make quick lists of random numbers or random text in Excel. It’s similar to the old RANDBETWEEN function, but gives you better control over the results.

Video: RANDARRAY Function Example

The Excel RANDARRAY function is available in Excel 365, and other versions that support Spill functions.

In this short video, I show a simple RANDARRAY formula, to create a list of 30 random numbers. Next, I make better formulas, so it’s easy to quickly adjust the RANDARRAY results.

Note: In older versions of Excel, you can use RAND or RANDBETWEEN to return random numbers.

RANDARRAY Arguments

The RANDARRAY function has 5 arguments, and all of them are optional:

  • =RANDARRAY([rows],[columns], [min],[max], [whole_number])

For example, if you type the following formula (with zero arguments) in a cell:

  • =RANDARRAY()

The result is one random decimal number, between zero and 1.

RANDARRAY formula with zero arguments

All 5 Arguments

Or, if you type the following formula (with all 5 arguments)  in a cell:

  • =RANDARRAY(6,1,1,15,TRUE)

The result is a 6 row, 1 column list of random whole numbers, between 1 and 15.

RANDARAY formula with all 5 arguments

Flexible Argument Settings

Instead of typing the arguments in the RANDARRAY formula, you can refer to worksheet cells.

I use this technique to create flexible formulas, that I can adjust quickly and easily.

In the worksheet shown below, the RANDARRAY formula refers to cell B4 (Rows) and C4 (Max)

  • =RANDARRAY($B$4, 1, 1, $C$4, TRUE)

RANDARRAY formula refers to worksheet cells

If I type a different number in B4 or C4, the formula results change immediately.

The formula can return:

  • a short list, or a long list, of random numbers
  • a small range of numbers or a large range.

Note: the Max number must always be equal to, or larger than, the Min number.

More RANDARRAY Examples

For more RANDARRAY function examples, go to the RANDARRAY Function page on my Contextures site.

The examples there show how to create a list of random numbers, or month names, or employee names.

RANDARRAY list of random employee names

Or try the advanced RANDARRAY examples, like a list of random workdays in a specific date range.

list of random workdays in a specific date range

Related Links

These pages on my Contextures site have details and examples for other functions that work well with RANDARRAY.

CHOOSE Function

Rounding Formulas

INDEX function and MATCH Function

WORKDAY Function

_________________

Quick Excel Lists with RANDARRAY Function – Examples

Quick Excel Lists with RANDARRAY Function – Examples

________________

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.