RANDBETWEEN


Returns an integer random number in a specified range.

Syntax:

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.

Example:

RANDBETWEEN(20, 30)

returns an integer between 20 and 30 (inclusive).


Application:

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:

  • 1 corresponds to Alex
  • 2 corresponds to Ben
  • 3 corresponds to Chris
  • 4 corresponds to Dana
  • 5 corresponds to Emily


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:

  • Column 1 (Customer ID): This is the unique identifier for the customer.
  • Column 2 (RANDBETWEEN(1, 5) Result): A formula is placed in this column. For the first customer, the formula would be in a cell (let's say B2) and would simply be RANDBETWEEN(1, 5). The spreadsheet immediately calculates and displays a random number (e.g., 3).
  • Column 3 (Assigned Sales Representative): Another formula is placed here (e.g., in cell C2). This formula checks the number generated in the previous column and returns the corresponding name.


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.





This page is protected by Google reCAPTCHA. Privacy - Terms.
 
Built using Zapof