Excel 2024: Generating Random Numbers in Excel
August 13, 2024 - by Bill Jelen
The RAND
function generates a random decimal between 0 and 1, not including 1. The RANDBETWEEN
function generates a random integer between 2 numbers. The new RANDARRAY
function products an array of random numbers. Specify the numbers of rows, columns, minimum, maximum, and if you only want integers.
If you ask for =RANDARRAY(14,1,50,150,True)
, you will get a scatttershot of numbers from 50 to 150. In some models, it might make more sense to have the numbers in a bell curve with a mean of 100 and a standard deviation of 25. Use =SORT(NORM.INV(RANDARRAY(14),100,25))
to generate random numbers that tend to be closer to 100.
This article is an excerpt from MrExcel 2024 Igniting Excel
Title photo by Andrew Ridley on Unsplash