kylefoley76
Well-known Member
- Joined
- Mar 1, 2010
- Messages
- 1,553
This macro is taking about 1 second to loop through just 1 iteration and it is a very simple macro. With about 700 interations it will take more than 11 minutes.
What is wrong?
What is wrong?
Code:
Sub dates()
Dim thedate As Date
thedate = ActiveCell.Offset(-1).Value
Dim i As Integer
Application.ScreenUpdating = False
Do Until ActiveCell.Offset(0, 1) = ""
i = i + 1
If ActiveCell.Offset(0, 2).Value <> "x" Then
ActiveCell = thedate
Else
thedate = thedate + 1
ActiveCell = thedate
End If
ActiveCell.Offset(1).Select
Loop
Application.ScreenUpdating = True
End Sub