Table of Contents
To generate a random number in Excel, you can use the “RAND” function. This function generates a random decimal number between 0 and 1 each time it is recalculated. To generate a random number within a specific range, you can use the “RANDBETWEEN” function. This function allows you to specify a minimum and maximum value for the random number. You can also use the “RANDARRAY” function to generate a series of random numbers at once. These functions can be useful for tasks such as creating a random sample or assigning random values to data.
This article describes the formula syntax and usage of the RAND function in Microsoft Excel.
Description
RAND returns an evenly distributed random real number greater than or equal to 0 and less than 1. A new random real number is returned every time the worksheet is calculated.
Syntax
RAND()
The RAND function syntax has no arguments.
Remarks
To generate a random real number between a and b, use:
=RAND()*(b-a)+a
If you want to use RAND to generate a random number but don’t want the numbers to change every time the cell is calculated, you can enter =RAND() in the formula bar, and then press F9 to change the formula to a random number. The formula will calculate and leave you with just a value.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in Communities.
See Also
Cite this article
stats writer (2024). How can I generate a random number in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-generate-a-random-number-in-excel/
stats writer. "How can I generate a random number in Excel?." PSYCHOLOGICAL SCALES, 30 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-generate-a-random-number-in-excel/.
stats writer. "How can I generate a random number in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-generate-a-random-number-in-excel/.
stats writer (2024) 'How can I generate a random number in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-generate-a-random-number-in-excel/.
[1] stats writer, "How can I generate a random number in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I generate a random number in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
