ExcelBanter

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

ed

Random Numbers
 
Does any have any code for generating random numbers and
then input them in a cell?

Chip Pearson

Random Numbers
 
Ed,

You can use the Rnd function to return a random number. For
example,

Dim Rng As Range
For Each Rng In Range("A1:A10")
Rng.Value = Rnd
Next Rng



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"ed" wrote in message
...
Does any have any code for generating random numbers and
then input them in a cell?





All times are GMT +1. The time now is 02:47 PM.

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