Enzo_Matrix
Board Regular
- Joined
- Jan 9, 2018
- Messages
- 113
I am trying to get my table to insert a blank row after a set date, but this code is creating a continual loop that I need to break manually.
I'm not sure what I have done wrong, but can someone please help me correct this code or suggest something that would work better?
I'm not sure what I have done wrong, but can someone please help me correct this code or suggest something that would work better?
Code:
Sub InsrtRow()
Dim C As Range
With Sheets("Weld")
For Each C In .Range("G5", .Cells(Rows.Count, 7).End(xlUp))
If C >= Date + 2 Then
C.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
End If
Next
End With
End Sub