Excel command RANDBETWEEN() results — multiples of n only

Hello,

How would you configure the Excel command, RANDBETWEEN(), to only return multiples of some number, n?

For example, if you specify

min = 100 &
max = 200,

RANDBETWEEN() will return an integer, n, for which 100 < n < 200 (or is it 100 <= n <= 200?) — not sure. But regardless, suppose you want the returned value to also be only a multiple of 5 (ie 105, 110, 115, etc)?

Thanks
Saqib Husain

100+int((200-100)*rand())

100+int((200-100)*rand()/5)*5
Subodh Tiwari (Neeraj)

membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You may also use one of the following formulas as per your requirement....

``=CEILING(RANDBETWEEN(100,200),5)``

OR

``=FLOOR(RANDBETWEEN(100,200),5)``
wsh2

=(RANDBETWEEN(100/5,200/5)) * 5
It appears that it's 100 <= n <= 200 (as confirmed by testing)

From Excel Help:
The RANDBETWEEN function syntax has the following arguments:
Bottom    Required. The smallest integer RANDBETWEEN will return.
Top    Required. The largest integer RANDBETWEEN will return.
"Will return" is the key here....