In Microsoft Excel, RANDBETWEEN is one of the many functions available. What it does is return a random integer within a specified range.

From picking a random contestant winner to generating random values in multiple cells, RANDBETWEEN can save you a lot of trouble and time.

Let's see some practical examples of how this functionality might be implemented in real-life settings with the help of this quick how-to guide.

How to Use Excel's RANDBETWEEN Function

The syntax for implementing RANDBETWEEN in Excel is similar to most other functions.

This syntax is =RANDBETWEEN(bottom, top). ‘Bottom' indicates the smallest integer and ‘top' signifies the largest one that RANDBETWEEN can return.

Using the function =RANDBETWEEN(1, 10)

For example, let's say you have a list of integers 1 to 10 in an Excel spreadsheet. To choose a random integer within this range, you can enter =RANDBETWEEN(1, 10) in a new cell.

Using the function RANDBETWEEN(C6, C15)

Alternatively, if you think that you will change the original numbers in the future, you can simply replace the bottom and top integers in your table with the relevant cell names (C6 and C12 from the photo above).

Next, hit the Return or Enter key on your keyboard to see the function generate a random value within the range you specified.

Related: How to Remove Duplicates in Excel

How to Use RANDBETWEEN Only One Time

Note: The RANDBETWEEN command generates a different random integer each time the worksheet is calculated.

To get a random integer only once, type the RANDBETWEEN function as you normally would, and then instead of pressing Enter on your keyboard, press F9. This will automatically transform the function into a random integer within your specified range.

Now that you know how to use this function in general, let's look at some real-life, practical examples for when to put it into action.

Related: The Best Excel Alternatives for Your Spreadsheet Needs

How to Choose a Contestant Winner Using Excel

Choosing a random contestant winner using Excel

Choosing a random prize winner for a contest is one of the most common real-life uses for RANDBETWEEN. Fortunately, this is straightforward:

  1. Before implementing the function, ensure that the names of participants in your contest are listed in an Excel spreadsheet.
  2. Then, in a column next to the names, type in numbers ascending from 1.
  3. Put your RANDBETWEEN function in another cell, replacing placeholders 1 and the last number in the list (10 in the example above). Or the names of the first and last cells in the numbers column (A3 and A12 in the image above).
  4. Press Enter to choose the winner (or F9). In this case, the winner would be Russell, since his name corresponds with the random integer that RANDBETWEEN returned.

How to Generate Random Numbers in Multiple Cells in Excel

If you need to generate a few random numbers in multiple cells, RANDBETWEEN is the function you need.

Generating random numbers in multiple Excel cells
  1. To do this, first type a RANDBETWEEN function with a specified range in any cell (say, 1 through 100).
  2. Next, click and drag the Fill Handle over as many cells as you want to be populated with random integers.
  3. Release the Fill Handle, and it will fill the cells with random integers between 1 and 100.

The feature would be useful in a variety of situations other than for generating lottery numbers. For instance, you can use it to assign random numbers to people as part of a game.

Using Excel's RANDBETWEEN function to assign game participants random numbers

For example, 10 people are included in the photo above. You can provide them each with a random number using the RANDBETWEEN function in the cell next to their name and then drag the Fill Handle to the bottom of the list.

Then, all of your participants will have a random number. Much easier than coming up with the numbers on your own.

Related: Excel Lookup Functions to Search Spreadsheets Efficiently

Other Useful Excel Functions for Common Issues

Excel has a lot of powerful functions that solve real-life problems. RANDBETWEEN is simply one of the many useful functions in Excel to analyze data.

While Excel does include simple functions like the product multiplication function, there are also many complex functions worth exploring and putting into practice.