Delete row when zero in column b thru e

A

Andy

Hi All

I am sorry for posting it twice
Can some one help me with macro or vba code to delete the row when column B,,C,D, and E all 4 have the value of 0
(It has to be 0 in all 4 column). Its very big sheet with thousands of rows. Please help
I dont want this code to look row 1 thru 6. Because first 6 rows has headings this Should start from row 7 and end at row till the data ends

Thank
And
 
N

Norman Jones

See reply at your previous post

---
Regards,
Norman

Andy said:
Hi All,

I am sorry for posting it twice.
Can some one help me with macro or vba code to delete the row when column
B,,C,D, and E all 4 have the value of 0.
(It has to be 0 in all 4 column). Its very big sheet with thousands of rows. Please help
I dont want this code to look row 1 thru 6. Because first 6 rows has
headings this Should start from row 7 and end at row till the data ends.
 
C

Charles

Andy,


Here is my version thouge not tested.


Sub del_0()
Application.ScreenUpdating = False
Dim i As Long
Dim rng As Range
Worksheets("sheet1").Activate
Set rng = Worksheets("Sheet1").Cells(1, 1).CurrentRegion
For i = 7 To rng.Rows.Count
If rng(i, 2).Value = 0 And rng(i, 3).Value = 0 And rng(i, 4).Valu
= 0 And rng(i, 5).Value = 0 Then
rng(i, 2).EntireRow.Delete
i = i - 1
End If
Next i
End Sub


Charle
 
Top