RANDARRAY
TheRANDARRAY 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.
- How to use
RANDARRAYformula? - Examples of using
RANDARRAYformula RANDARRAYformula not working?- Similar formulas to
RANDARRAY
Usage
Use the RANDARRAY formula with the syntax shown below, it has 2 required parameters:
=RANDARRAY(rows, columns)- rows (required):
The number of rows that the resulting array should have. Must be a positive integer. - 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 theRANDARRAY 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.
Add noise to data
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.
Related Formulas
The following functions are similar to RANDARRAY or are often used with it in a formula:
-
RANDThe
RANDfunction 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. -
RANDBETWEENThe
RANDBETWEENformula generates a random integer between the two specified numbers. It is commonly used to simulate random events or generate test data. -
RANDARRAYThe
RANDARRAYformula 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.
Learn More
You can learn more about the RANDARRAY Google Sheets function on Google Support.