Matt,
Set starta = ActiveSheet.Range("a2")
LR = ActiveSheet.Range("a" & Rows.Count).End(xlUp).Offset(1, 0).Row
For i = LR To 0 Step -1
If starta.Offset(i, 0).Value = 0 Or _
Application.CountA(starta.Offset(i, 1).Resize(1, 4)) = 0 _
Then starta.Offset(i, 0).EntireRow.Delete
Next i
HTH,
Bernie
MS Excel MVP
"Matt G" <(E-Mail Removed)> wrote in message
news:F2FF438A-1C24-4E93-BEFD-(E-Mail Removed)...
> Hi,
>
> I am using this code to delete the row if the cell in column A is blank.
> Dim i, j As Integer
> Set starta = ActiveSheet.Range("a2")
> LR = ActiveSheet.Range("a" & Rows.Count).End(xlUp).Offset(1, 0).Row
> For i = LR To 0 Step -1
> If starta.Offset(i, 0).Value = 0 Then starta.Offset(i, 0).EntireRow.Delete
> Next i
>
> I would then like to delete a row if the cells in columns B, C, D, and E are
> all blank even if the cell in column A is not blank
>
> Any ideas?
|