Generate random number with Excel and Numbers

Generate a random number in Microsoft Excel or output a random value in Apple Numbers; it's not difficult at all. With the right combination of function, formula and syntax, both spreadsheet apps output a random number with or without decimal places, rounded or not, and in an individually selected range from a lowest to a highest number. In the following you will find the commands for the individual cells to generate random numbers with Excel and Numbers.

Microsoft Office Excel - generate random number

The syntax = ZUFALLSZAHL () works, among other things, in Excel for Office 365 on the Windows PC, Excel for Office 365 on the Apple Mac, Excel Online, Excel 2019 and in other versions of the software. Microsoft points out that the Mersenne Twister algorithm has been used to create random values ​​since the 2010 version. Whoever wants to read about it can do so, among other things on Wikipedia to do. Here are the options for creating random numbers in the table:

Create a random number between 0 and 1 (decimal number)

= RANDOM NUMBER ()

Generate Excel random number between 0 and x (replace x with number!)

= RANDOM NUMBER () * x

Create rounded decimal number or whole number in the range (a is the number of decimal places; can also be 0)

= (ROUND (RANDOM () * x; a))

The same thing, only that the number range does not start with 0, but with a self-selected lowest number y (replace y with a number that is smaller than x!)

= (ROUND (RANDOM () * (xy) + y; a))
Generating an Excel random number is not that difficult. Once you have understood the input, a wide variety of examples can be identified.

Generating an Excel random number is not that difficult. Once you have understood the input, a wide variety of examples can be identified.

Excel random number - examples for clarity

Granted, the syntaxes or formulas listed above are not particularly descriptive. I'll take the penultimate and last example for the explanation. If you want a number without decimal places between 0 and 10, it looks like this:

= (ROUND (RANDOM () * 10; 0))

If the number should have two places after the decimal point, it looks like this:

= (ROUND (RANDOM () * 10; 2))

If you want a number between 50 and 100 that has no decimal places, then enter this:

= (ROUND (RANDOM () * (100-50) +50; 0))
Create a random number in Excel - here again the above overview with all syntax entries. This is how you can find the right random value in Microsoft Office.

Create a random number in Excel - here again the above overview with all syntax entries. This is how you can find the right random value in Microsoft Office.

Apple Numbers - generate random number

The same commands are used in the standard spreadsheet for macOS on the Apple Mac, iMac and MacBook. So if you're in Numbers want to generate a random number, you can use the same inputs as in Excel. Only the visual appearance of the input is slightly different, at least much more graphical. In Numbers, it is easier to see which values ​​belong to which command because not only brackets are displayed, but bracketed ranges. This makes it easier for beginners if they want to get by with complex inputs. There is also a syntax selection and explanation on the right by default.

The breakdown of the input is graphically prepared when generating random numbers in Numbers and all other inputs.

The breakdown of the input is graphically prepared when generating random numbers in Numbers and all other inputs.

An overview of the possible commands and an explanation of the currently used commands is displayed on the right.

An overview of the possible commands and an explanation of the currently used commands is displayed on the right.

Counselor: Convert ODT to DOC - solution for Apple Mac and Windows PC

-
Did you like the article and did the instructions on the blog help you? Then I would be happy if you the blog via a Steady Membership or at Patreon would support.

Leave a Comment

Your e-mail address will not be published. Required fields are marked with * marked