Hello and welcome back to the Excel Tip of the Week. This week we have a General User post in which we look at two random-number-generating functions, RAND and RANDBETWEEN.

**What RAND does: **RAND generates a random number with 15 decimal places, somewhere between 0 and 1. Each RAND formula will make a different random number from each other RAND, and every time something changes in the workbook, every RAND will be changed to a new random number.

**How to write a RAND formula: ** =RAND()

That’s it! The function is completely defined by its name and doesn’t require any inputs from you at all. You do still need to write the () part though.

**How to use a RAND formula for random sampling:**Because each RAND is different, it can be used to pick a random sample from a list of data by shuffling that list into a random order. Check out the demonstration in the attached file.

**What RANDBETWEEN does:**RANDBETWEEN generates a random integer number between two posts you specify.

**How to write a RANDBETWEEN formula:**

=RANDBETWEEN(lower bound, upper bound)

Lower bound – the lowest possible number you want the formula to make. Must be a whole number, but can be positive or negative.

Upper bound – the highest possible number you want the formula to make. Must be a whole number, but can be positive or negative. Must be larger than lower bound.

Unlike RAND, with RANDBETWEEN you are not guaranteed to avoid duplicates; depending on the width of the interval you specify, duplicated values might be quite common if you have multiple RANDBETWEENs. For almost all cases, RAND is a better formula to use.

Previous post

TOTW index

Next post

*This blog is brought to you by the*

*Excel Community*

*where you can find additional blogs, extended articles and webinar recordings on a variety of Excel related topics. In addition to live training events, Excel Community members have access to a*

*full suite of online training modules*

*from Excel with Business. There is also an online forum where you can ask questions and share ideas with other community members.*