I am working through the VBA for Dummies book on excel 2007.
And have entered the code:
Sub FillRange()
Dim Count As Long
For Count = 1 To 100
ActiveCell.Offset(Count - 1, 0) = Rnd
Next Count
End Sub
Don't laugh please we all have to start somehwere, the thing is the code is supposed to fill cells A1:A100 with 1 to 100 (I add the Step 1 variable to it also)
All I get is seemingly randon decimals ie 0.95 in all of the cells
Can anyone shed some light on what I am doing wrong please
Thanks
Craig
And have entered the code:
Sub FillRange()
Dim Count As Long
For Count = 1 To 100
ActiveCell.Offset(Count - 1, 0) = Rnd
Next Count
End Sub
Don't laugh please we all have to start somehwere, the thing is the code is supposed to fill cells A1:A100 with 1 to 100 (I add the Step 1 variable to it also)
All I get is seemingly randon decimals ie 0.95 in all of the cells
Can anyone shed some light on what I am doing wrong please
Thanks
Craig