Filling cells with random numbers using loops? (VBA)
Hello,
I need to write a mcro that fills all the cells in the block range of cell with random numbers between 0 and 1.
so far I've done this:
Sub number()
Dim x As Double
For x = 1 To 10
Workbooks("book1").Sheets("Sheet1").Range("A1:f20" ).Offset(x, j).Value = Rnd()
Next
End Sub
the problem with my macro is having one random number on almost the entire determined range.
|