# Use RANDBETWEEN to create random number generator in Excel You can use the function: EDGE BETWEEN to generate random integers (integers only) between a range of values ​​in an Excel sheet. Use the function arguments to specify a range.

Although the most commonly used function EDGE returns a decimal value from 0 to 1 EDGE BETWEEN can generate an integer between two specific values, such as 0 and 10 or 1 and 100,

If you need to generate random numbers including decimal values, use the function EDGE in Excel.

These instructions apply to Excel 2019, 2016, 2013, 2010, Excel Online, and Excel for Office 365.

### RANDBETWEEN Function Syntax and Arguments

Function syntax is the layout of a function and contains the function name, parentheses, comma separators, and arguments. Syntax for a function EDGE BETWEEN

` = СЛУЧМЕЖДУ (снизу, сверху) `
• bottom (required) is the smallest possible integer that the function can return as a result. You can enter an actual integer for this argument, or you can use a cell reference to position the data on the worksheet.
• Top (required) – The maximum possible integer that the function can return. You can enter a real integer or use a cell reference for this argument.

If the Bottom argument is greater than the Top argument, the function is EDGE BETWEEN will return the error value #NUM! Like the feature EDGE EDGE BETWEEN is one of Excel’s mutable functions, which means:

• Every time someone makes changes to the worksheet, the function recalculates and produces a new random number.

• Any formula that depends – directly or indirectly – on the cell containing the mutable function is also recalculated every time someone makes a change.

• Be careful when using mutable functions in spreadsheets or workbooks that contain large amounts of data, as they can slow the program’s response time due to the frequency of recalculations.

### Using the Excel RANDBETWEEN Function

The example below shows how to get the function: EDGE BETWEEN which returns a random integer between 1 and 100.

Input options for a function and its arguments include:

• Enter a full function to a leaf cell

• Selecting a function and arguments with dialog function

Many users find it easier to use the Function dialog box because it allows for entering the function’s syntax, including parentheses and comma separators between arguments. 1. Enter data in cells A2 and B2 as shown in the image above (1 and 100 respectively).

2. Press cell C3 to make it the active cell that contains the function EDGE BETWEEN

3. Press formulas tab on the adhesive tape

4. Click the icon Mathematics and Triggers to open the drop-down list of functions.

5. Click EDGE BETWEEN in the list to open the Function dialog box. The data you enter on the empty lines in the dialog box is the function’s arguments.

6. Click Lower in the dialog box.

7. Click cell A2 on the sheet to enter that cell reference into the dialog box.

8. Click Top in the dialog box.

9. Click on a cell B2 on the worksheet to enter a link to the second cell.

10. Click Okay to end the function and return to the worksheet.

11. A random number between 1 and 100 must appear in cell C3

12. To generate another random number, press the key F9 on the keyboard and the sheet is recalculated.

13. By clicking cell C3 full function = EDGE BETWEEN(A2, B2) appears in the formula bar above the worksheet.