Hello,
Attached file column A shows 24 values which are entered by the user. Cell E3 calculates a random value every time there is a change in the worksheet. This is an array function. What I want is that every random value is calculated as much as the number of iterations entered in Cell E1. Every random value must be placed from Cell E3 in column G, starting with Cell G2. Following random value calculated from Cell E3 must be placed in Cell G3 etc. This as much as the number of iterations enterd by the user. I tried a couple of times in Vba, but I need some advise! Here is a start from my code.
Thanks in advance!
Cheers, Bart
Sub Randomnumber()
Range("E5").Name = "Source"
Range("G2").Select
ActiveCell = Destination
Iterations = 5000
Counter = 1
Do While Counter <= Iterations
Range("Source").Select
Selection.Copy
Range("Destination").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.Offset(1, 0).Select
Counter = Counter + 1
Loop
End Sub
Bookmarks