ExcelFlux

RANDBETWEEN function

a random number between the numbers you specify.

Math and trigonometry

Where can you use it?

Reporting, manufacturing and engineering teams. When a total, rounding step or numerical transformation is needed, use the example to see which operation fits your inputs.

Scenario in the workbook

When both boundaries are equal, that value is the only possible result. Increase the upper bound to allow variation.

A worked example from the workbook

RowA
6Trial
710
820
930
Record 1
=RANDBETWEEN(A7,A7)

Expected result10

See the inputs and instructions for all 3 examples

Copyable formulas

English Excel · en-US
=RANDBETWEEN(A7,A7)
Turkish Excel · tr-TR
=RASTGELEARADA(A7;A7)

Worked examples

When both boundaries are equal, that value is the only possible result. Increase the upper bound to allow variation.

Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.

Row A
6 Trial
7 10
8 20
9 30
Case Formula Expected result
Record 1 =RANDBETWEEN(A7,A7) 10
Record 2 =RANDBETWEEN(A8,A8) 20
Record 3 =RANDBETWEEN(A9,A9) 30
Microsoft Excel reference