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 RAND
function 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 RANDBETWEEN
function 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)
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