You can also try this code as well
Sub checkTwoCols()
Dim i As Integer, lr As Integer
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Petty cash")
ws.Activate
lr = Cells(Rows.Count, 1).End(xlUp).Row
For i = lr To 2 Step -1
Range("A" & i).Select 'you will be able to view the active cell during debugging otherwise you can delete this line
If Range("A" & i).Value = "" And Range("A" & i).Formula <> "" Then
If Range("A" & i).Offset(0, 4).Value = "" Then
Range("A" & i).EntireRow.Delete
End If
End If
Next i
End Sub
Hope this helps.
Bookmarks