Skip to main content
← All functions

RANDBETWEEN function

Returns a random number between the numbers you specify

Syntax

RANDBETWEEN(bottom, top)

Square brackets indicate optional arguments.

Arguments

ArgumentRequiredMeaning
bottomYesThe smallest integer RANDBETWEEN will return.1
topYesThe largest integer RANDBETWEEN will return.100

Try RANDBETWEEN

Draw an integer within inclusive limits

=RANDBETWEEN(A2,B2)

RANDBETWEEN can return any integer from 2 through 9, including both limits. Recalculate to draw again. The check accepts an integer in that interval, rather than one fixed answer. Change a bound to explore another range; edited source data is calculated without grading it against the original limits.

Checks for this calculation:

  • G2: Integer from 2 through 9.

Output: 1 rows × 1 columns. Keep RANDBETWEEN in the formula for this exercise. The check applies to this calculation's output.

Reference workbook results appear after recalculation in a compatible spreadsheet app. Current-data downloads refresh the results shown here. Keep formulas to recalculate later, or select Freeze results to save fixed values.

Inspect the current formula

Read its written arguments or observe actual operation values in a separate local calculation. This action neither applies a draft nor grades an answer.

Read the formula, one argument at a time

Explore the written function calls and their inputs. The calculation result belongs to the complete formula.

RANDBETWEEN · top-level call

=RANDBETWEEN(A2,B2)

1 / 2 · bottom

The smallest integer RANDBETWEEN will return.

RANDBETWEEN reference ↗

Follow the cells behind a result

Read explicit local references and helper formulas using a separate calculation. Your draft stays in this field; the worksheet and practice checks do not change.

The worksheet runs locally. Published checks apply to the supplied example only. Native Excel and Google Sheets compatibility remain unverified.

Reference and compatibility

Univer 1.0.4 / Apache-2.0. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.