Skip to content

RANDBETWEEN Has Its Uses

The RANDBETWEEN function is a very simple function. All it does is generate a random number between two values.

For example, let’s say you write the following formula in your spreadsheet:

=RANDBETWEEN(5,25)

What will happen when the spreadsheet re-calculates?

A random value between 5 and 25 (including 5 or 25) will result from the formula.

Alas, you have just found a way to generate a random number between any two values of your choosing.

Why Is This Useful?

Now you are probably thinking, why in the world is this useful? How can generating some random number possibly be applied to my life?

Well, here are three practical examples of using this formula in a real life situation. Believe it or not, this function actually has its uses.

Use No. 1 – Pick a Number Between…

Have you ever played that game where you have two people pick a number between 1 and 100 to decide who gets a prize or who gets to make the decision? If so, that is just one example where the RANDBETWEEN function can come in handy.

Let’s say that you are trying to make a choice between pancakes or waffles. Both sound great, but you just can’t decide. Here is what you would do:

Pick a number of your choice and place it in Cell C2.

The calculated number

Next, put your two options (pancakes and waffles in this case) in the cells below and add in the RANDBETWEEN formula for each option.

Once you add the formula for each option, all you have to do is check to see which result is the closest to your original number.

Pancakes has a score of 75

In this case 75 is closest to 64, so pancakes is the clear choice for the day!

Use No. 2 – Random Sorting

Here is another situation for you.

You are trying to decide in what order you would like to complete your daily chores. Each task seems exciting, so it’s impossible to decide what to start with and what comes after that.

Enter in the RANDWETWEEN formula!

Your first step in this scenario is to list out your chores in a single column.

The list of chores

Next, enter in the RANDBETWEEN formula two columns over (once for each chore).

Enter the formula for each chore

Now that you’ve entered in the RANDBETWEEN formula for each chore, you have a random set of numbers to use for your sort.

What you should do now is copy and paste these values in the column next to the chore list.

We do this because that the RANDBETWEEN formula will continue to re-calculate new numbers every time the workbook re-calculates. We don’t want our numbers to change, so this is why we copy and paste.

Copy the data

Be sure to paste the values only.

Be sure to paste the values only

Now that we have a random number for each chore, the last step in the process is to sort the chores in order.

To do this, highlight both the chores and their assigned numbers, right-click, and then select Sort > Custom Sort…

Select Custom Sort...

In the popup dialog box, be sure to select Column C, and then select Ok.

Select Column C

Finally, you have all your chores sorted in order and you know which to start with. Plus, you were able to sharpen your spreadsheet skills just a little bit along the way.

Use No. 3 – Creating Dummy Data

This last example is a personal favorite!

If you ever find yourself trying to make a graph for practice but you don’t have the data for it, you can always create your own random data set.

All you have to do is add the RANDBETWEEN function to let’s say Cell C2, and then drag the fill handle down several rows.

The formula =RANDBETWEEN(1,5000)

The spreadsheet fill handle

Drag down several rows

Finally, just copy and paste these values as we did before, and you’ve got yourself a random dataset to use for building graphs or other spreadsheet practice. It’s really that easy.

If you have any other ideas of how this function could be used, please leave a comment down below. We at Spreadsheet Life just might learn a thing or two from you!

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back To Top