# RANDARRAY

The `RANDARRAY` formula is used to create an array of random numbers between 0 and 1. The size of the array is determined by the number of rows and columns specified in the formula.

## Usage

Use the `RANDARRAY` formula with the syntax shown below, it has 2 required parameters:

Parameters:
1. rows (required):
The number of rows that the resulting array should have. Must be a positive integer.
2. columns (required):
The number of columns that the resulting array should have. Must be a positive integer.

## Examples

Here are a few example use cases that explain how to use the `RANDARRAY` formula in Google Sheets.

### Generate a random matrix

Use `RANDARRAY` to quickly generate a matrix of random numbers. This can be useful for testing or simulating data in a spreadsheet.

### Create a randomized list

`RANDARRAY` can be used in combination with other formulas to create a randomized list of items. For example, you could use `SORTN` to sort a list randomly and then `INDEX` to retrieve the first n items from the list.

You can use `RANDARRAY` to add some noise to your data. For example, you could multiply your data by a matrix of random numbers to add some variation to your data points.

## Common Mistakes

`RANDARRAY` not working? Here are some common mistakes people make when using the `RANDARRAY` Google Sheets Formula:

### Incorrect number of arguments

This error occurs when the user provides the wrong number of arguments to the RANDARRAY formula. Make sure that you have provided the correct number of arguments.

### Invalid arguments

This error occurs when the user provides invalid arguments to the RANDARRAY formula. Make sure that the arguments you provide are valid and meet the requirements of the formula.

### Incorrect syntax

This error occurs when the user provides incorrect syntax to the RANDARRAY formula. Make sure that you have entered the formula correctly and have not made any typos.

### Rows or columns are negative

This error occurs when the user provides negative values for the rows or columns argument. Make sure that you provide only positive values for these arguments.

### Rows or columns are too large

This error occurs when the user provides values for the rows or columns argument that are too large. Make sure that you provide values that are within the limits of the RANDARRAY formula.

The following functions are similar to `RANDARRAY` or are often used with it in a formula:

• `RAND`

The `RAND` function returns a random number between 0 and 1. This function is often used in combination with other functions to generate random values for simulations, games, or statistical analysis.

• `RANDBETWEEN`

The `RANDBETWEEN` formula generates a random integer between the two specified numbers. It is commonly used to simulate random events or generate test data.

• `RANDARRAY`

The `RANDARRAY` formula is used to create an array of random numbers between 0 and 1. The size of the array is determined by the number of rows and columns specified in the formula.

You can learn more about the `RANDARRAY` Google Sheets function on Google Support.