WPS Office

Free All-in-One Office Suite with PDF Editor

correct-icon

Edit Word, Excel, and PPT for FREE.

correct-icon

Read, edit, and convert PDFs with the powerful PDF toolkit.

correct-icon

Microsoft-like interface, easy to use.

Free Download

Windows • MacOS • Linux • iOS • Android

banner

How to make a simple lottery through the RANDBETWEEN Function?

Uploaded time: July 25, 2022 Difficulty Beginner

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.GIF_1.gif

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.GIF_2.gif

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.GIF_3.gif

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.GIF_4.gif

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!

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.