Wednesday 6 November 2019

How to Generate Random Numbers in Google Sheets

Sheets Header

Google Sheets provides a simple function to generate random numbers inside your spreadsheet without having to leave the document or install an add-on. The function returns a random integer between two values. Here’s how to use it.

Fire up the Google Sheets homepage and open either a new or existing spreadsheet. For this guide, we’ll use the function RANDBETWEEN to produce a random number.

By default, the RANDfunction only generates a number between 0 (inclusive) and 1 (exclusive), whereas RANDBETWEEN lets you specify a range of numbers. While you could modify the function to generate other ranges, the RANDBETWEENfunction is a much simpler way to accomplish this.

RELATED: How Computers Generate Random Numbers

Click on a cell where you want to insert a random number and type =RANDBETWEEN(<Low>, <High>) but replace <Low> and <High> with the range in which you want the random number to fall.

For example, if you want a random number between 1 and 10, it should look like this:

=RANDBETWEEN(1,10)

Type the function in to a cell, enter the low and high end of the random range, and then press the Enter key.

After you fill in the range, press the Enter key. The random number will populate the cell where you entered the formula.

Read the remaining 9 paragraphs



from How-To Geek https://ift.tt/2rdX8a1

No comments:

Post a Comment