Sub try()
Dim i As Integer
Range("a1").Select
For i = 1 To 2
ActiveCell = Range("a1").Value
ActiveCell.Offset(1).Select
Do While ActiveCell.Offset(-1).Value < 40
ActiveCell = ActiveCell.Offset(-1).Value + 1
ActiveCell.Offset(1).Select
Loop
Next i
End Sub
Sub try()
dim a as integer, i as integer
a = Range("a1").Value
For i = 1 To 2
do while range("a1").value< 40
Range("a1") = Range("a1").Value +1
Loop
Range("a1")=a
Next i
EndSub
Sub try()
Dim a As Integer, i As Integer
a = Range("a1").Value
For i = 1 To 2
Do While Range("a1").Value < 40
Application.Wait (Now() + TimeValue("00:00:01"))
Range("a1") = Range("a1").Value + 1
Loop
Application.Wait (Now() + TimeValue("00:00:01"))
Range("a1") = a
Next i
End Sub