Hello, I am trying to delete rows with older dates (older than 60 days) in column L but the macro below also deletes rows with blank values in that column. How can I adjust the macro so it does not delete the rows with blank values?
Sub DeleteOldTerms()
Dim lr As Long, I As Long
With Sheets("ExportedData")
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
lr = Range("L" & Rows.Count).End(xlUp).Row
For I = lr To 4 Step -1
If Range("L" & I).Value <= Date - 60 Then Rows(I).Delete
Next I
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End With
End Sub
Sub DeleteOldTerms()
Dim lr As Long, I As Long
With Sheets("ExportedData")
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
lr = Range("L" & Rows.Count).End(xlUp).Row
For I = lr To 4 Step -1
If Range("L" & I).Value <= Date - 60 Then Rows(I).Delete
Next I
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End With
End Sub