# How to make a simple lottery through the RANDBETWEEN Function?

Uploaded time: July 25, 2022 Difficulty Beginner

A free Office suite fully compatible with Microsoft Office

A free Office suite fully compatible with Microsoft Office

How to make a simple lottery through the RANDBETWEEN Function?

# How to make a simple lottery through the RANDBETWEEN Function?

WPS Spreadsheet could be an alternative to Microsoft Office Excel. It includes 100's of built-in formulas, pivot tables, and more.Today, we will learn the basic usage of the RANDBETWEEN function, which can be used to return a random integer between two specified numbers.

This function is relatively simple. For example, if I want to randomly generate an integer between 1 and 100, I only need to enter = RANDBETWEEN(1,100) in the cell and press the Enter key.

What should I do if I want to generate a decimal between 1 and 100? Similarly, we can use the RANDBETWEEN function to generate an integer randomly, and then divide it by a multiple of 10 after the formula.

Every time we press F9 or perform other editing actions, data with this function will automatically refresh. If we want to fix the randomly generated numerical value, copy and paste the function result as Value.

What interesting things can we do with the RANDBETWEEN function?

Suppose you are in charge of the company's lottery activities at the end of the year. You can use the RANDBETWEEN function and the INDEX function to generate a simple lottery tool.

Its principle is very simple. The INDEX function can return the result according to the given row number and column number. In this scenario, the RANDBETWEEN function can randomly generate the row number.

First, we copy and paste the personnel list of the whole company in column A;Enter the function formula in cell E4: =INDEX, then enter column A in brackets;Then enter a comma followed by RANDBETWEEN (1,60), where the minimum value is 1 and the maximum value is 60, the total number of people in the company.

Long press F9 and the name of the person will appear randomly in the cell.

When we raise our fingers, the lucky winner will be born!