The code I have below works well with the exception of one thing: Everything in row 1 is a heading and I don’t want the macro to look there. When I run this macro, if column E=”Complete” and the next cell in column F is blank it works well, but then it looks back at cell F1. How do I stop that?
Sub Edgewood()
Dim Mws As Worksheet
Dim Cws As Worksheet
Dim i As Long
Set Mws = Worksheets("Edgewood")
Set Cws = Worksheets("Edgewood-Closed")
For i = Mws.Range("E" & Rows.Count).End(xlUp).Row To 1 Step -1
If Range("E" & i).Value = "Complete" And IsDate(Range("F" & i).Value) Then
Rows(i).Copy Cws.Range("A" & Rows.Count).End(xlUp).Offset(1)
Rows(i).Delete
Else
MsgBox "There is no data in cell F" & i
ActiveWorkbook.Save
End If
Next i
End Sub
Sub Edgewood()
Dim Mws As Worksheet
Dim Cws As Worksheet
Dim i As Long
Set Mws = Worksheets("Edgewood")
Set Cws = Worksheets("Edgewood-Closed")
For i = Mws.Range("E" & Rows.Count).End(xlUp).Row To 1 Step -1
If Range("E" & i).Value = "Complete" And IsDate(Range("F" & i).Value) Then
Rows(i).Copy Cws.Range("A" & Rows.Count).End(xlUp).Offset(1)
Rows(i).Delete
Else
MsgBox "There is no data in cell F" & i
ActiveWorkbook.Save
End If
Next i
End Sub