Delete row when zero in column b thru e

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top