RANDBETWEEN function in Excel returns a random integer between the two given numbers.
Math and trigonometry
Get a random integer between two values
bottom – The value equivalent to the lower limit of the range. Even if RANDBETWEEN function accepts decimal number, it will be rounded up to the nearest integer.
top – The value equivalent to the upper limit of the range. Decimal number will be rounded down to the nearest integer.
RANDBETWEEN function updates every time when the worksheet is recalculated or when a workbook is opened.
In Excel with Office 365, RANDBETWEEN has a more powerful alternative called RANDARRAY.