Returns an integer random number in a specified range.
RANDBETWEEN(bottom, top)
Returns an integer random number between integers bottom and top (both inclusive).
This function produces a new random number each time Zapof function recalculates.
RANDBETWEEN(20, 30)
returns an integer between 20 and 30 (inclusive).
Assigning Customers to Sales Representatives
A company wants to evenly distribute new customer leads among their team of sales representatives. To ensure fairness, they decide to use a random assignment method. The company has five sales representatives: Alex, Ben, Chris, Dana, and Emily.
The RANDBETWEEN Function
The RANDBETWEEN function is used to generate a random integer between a lower and upper limit (inclusive). The syntax is RANDBETWEEN(bottom, top).
The Table
The following table shows how the RANDBETWEEN function is used to assign each new customer lead to a sales representative. A number from 1 to 5 is randomly generated for each customer, and this number corresponds to a specific sales representative.
Customer ID | RANDBETWEEN(1, 5) Result | Assigned Sales Representative | ||
|---|---|---|---|---|
A | B | C | ||
1 | 1001 | 1 | Alex | |
2 | 1002 | 4 | Dana | |
3 | 1003 | 1 | Alex | |
4 | 1004 | 4 | Dana | |
5 | 1005 | 2 | Ben | |
6 | 1006 | 5 | Emily | |
7 | 1007 | 2 | Ben | |
8 | 1008 | 5 | Emily |
Here is the breakdown of the process:
1. The Goal
The objective is to assign each new customer lead to a random sales representative from a list of five: Alex, Ben, Chris, Dana, and Emily.
2. The Tool
The RANDBETWEEN function is the core tool. Its purpose is to generate a random whole number between a specified lower and upper limit. In our case, the lower limit is 1, and the upper limit is 5. The formula is RANDBETWEEN(1, 5).
3. The Linkage
To connect the random number to a specific sales representative, we create a simple, logical rule:
This can be thought of as a simple lookup table or a defined rule set.
4. The Process in the Table
For each new customer lead (each row in the table), the following happens:
What Makes it "Random"
The key point is that the number in the second column is not a fixed value. It is the result of a calculation. Every time the spreadsheet is updated or recalculated, the RANDBETWEEN function runs again, generating a new random number. This new number then causes the name in the "Assigned Sales Representative" column to update automatically.
PRODUCT & FEATURES
RESOURCES
Terms | Privacy | Spam Policy
© 2026 Zapof