Euro5
asked on
VBA Delete based on date
This code is not doing anything, but I do have a date 1/1/1900 in column E.
Am I missing something obvious?? THANK YOU!
Sub DeleteDateur()
Application.Calculation = xlManual
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("ur data") 'define which worksheet
Dim LastRow As Long
LastRow = ws.Cells(ws.Rows.Count, "C").End(xlUp).row
Dim iRow As Long
For iRow = LastRow To 1 Step -1
If ws.Cells(iRow, "E").Value = vbNullString Or ws.Cells(iRow, "E").Value = "1/1/1900" Then
ws.Rows(iRow).Delete
End If
Next iRow
Application.Calculation = xlAutomatic
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.