My VBA code is:
Sub hello()
Dim i As Long
Sheets("Sheet10").Select
For i = 3 To 101
Cells(i, 21).Value = Cells(2, 21).Value
Cells(i, 22).Value = Cells(2, 22).Value
Sheets("Sheet10").Calculate
Next i
End Sub
Cells(2,21) and Cells(2,22) contain a random formula, it could be =RAND() for simplicity. I would like to:
- Copy
Cells(2,21)andCells(2,22) - Paste
Cells(2,21)andCells(2,22)value in the nextirow; - Refresh
Cells(2,21)andCells(2,22) - Repeat until
iis equal to101.
What I get instead is that when i=52 the sub miss point 3. and from i=52 to i=101 I get the same values. How can I address this issue?