RANDARRAY function in Excel 365


Introduction

The RANDARRAY function is one of the exclusive functions that is introduced in the latest version of Excel 2021 or Excel 365. It would return an array comprising numbers between 0 and 1. It is one of the quickest techniques to generate random floating numbers or integers number. Furthermore, users may apply a dynamic array formula to it and interpret the result. In this article, we will explore the concept of the RANDARRAY function that is necessary for data modeling, data analysis, and validation of data.

Syntax

RANDARRAY([rows],[columns],[min],[max],[integer]) 
  • rows − It specifies the generated array’s row number.

  • columns − It indicates the generated array’s column number.

  • min − the minimum value from where a random number is to be generated in the final array. It is optional.

  • max − the maximum value can be generated in the final array and is optional.

  • integer − contains two values. Either True if the only number being obtained is an integer, or False if the resultant array needs decimal integers as well. It is also an optional parameter. By default, a false value would be considered.

RANDARRAY function in Excel 365

Step 1

Suppose the user needs to generate the 5*3 array in the worksheet. To achieve this, enter the formula =RANDARRAY(5,3) as shown in below image−

Step 2

Therefore, random floating numbers lying between 0 and 1 are generated as shown below image−

Creation of 3*3 array with specified minimum and maximum value

Step 1

Open a new worksheet and type the formula =RANDARRAY(3,3,5,10) in the B3 cell as highlighted in the below image −

Step 2

Therefore, an $\mathrm{3\:\times\:3}$ array of decimal numbers is developed through this RANDARRAY function.

Generation of random integer numbers in 5*6 array

Step 1

Enter the formula “=RANDARRAY(5,6,1,7,TRUE)” in the B3 cell as highlighted in below image−

Step 2

Hence, the 5*6 array is being created as given below

Explanation

=RANDARRAY(5,6,1,7,TRUE)
  • The first and second arguments denote the five rows and six columns to be generated in an array.

  • The third argument 1 indicates the minimum integer value in the resulting array.

  • The fourth argument 7 indicates the maximum value in the generated array.

  • The fifth argument “TRUE” specifies that only integer values are to be generated.

Conclusion

Excel beginners and experts may improve their Excel proficiency through these techniques. By following these step-by-step instructions, we have learned how to quickly create non-consecutive numbers using Excel’s powerful features.

Updated on: 28-Nov-2023

89 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements