ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Random Numbers (https://www.excelbanter.com/excel-programming/387803-random-numbers.html)

Khanjohn

Random Numbers
 
I know how to use =Rand() but i need to generate numbers between 2 and 100 or
2 and 20 etc and want whole numbers not 4.6789678. How is this done
please..Brain has quit functions after being up so late.

Mike H

Random Numbers
 
use int;-

=INT(RAND()*(100-1)+1)

Mike

"Khanjohn" wrote:

I know how to use =Rand() but i need to generate numbers between 2 and 100 or
2 and 20 etc and want whole numbers not 4.6789678. How is this done
please..Brain has quit functions after being up so late.


Roger Whitehead

Random Numbers
 
See OLH for Rnd - there is an example for ding what you require.
HTH
Roger


"Khanjohn" wrote in message
...
I know how to use =Rand() but i need to generate numbers between 2 and 100
or
2 and 20 etc and want whole numbers not 4.6789678. How is this done
please..Brain has quit functions after being up so late.




Khanjohn

Random Numbers
 
Thank you MikeH that solved it.

"Khanjohn" wrote:

I know how to use =Rand() but i need to generate numbers between 2 and 100 or
2 and 20 etc and want whole numbers not 4.6789678. How is this done
please..Brain has quit functions after being up so late.



All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com