Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Delete row when zero in column b thru e

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete row when zero in column b thru e

Andy,

"0" on the same row, or diff. rows?

Charle

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Delete row when zero in column b thru e

See reply at your previous post

---
Regards,
Norman

"Andy" wrote in message
...
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.

Thanks
Andy




  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Delete row when zero in column b thru e

0 on the same row starting row 7th till unknown end row.

Thanks
Andy
-----Original Message-----
Andy,

"0" on the same row, or diff. rows?

Charles


---
Message posted from http://www.ExcelForum.com/

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete row when zero in column b thru e

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

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot delete a column Art Excel Discussion (Misc queries) 0 December 10th 09 10:47 PM
Copy column header to next column, delete & delete every nth colum genehunter New Users to Excel 1 June 2nd 09 03:57 PM
delete cells column. Delete empty cells myshak Excel Worksheet Functions 0 March 9th 09 10:59 PM
How do I delete everything after a / in a column? henderson Excel Worksheet Functions 17 July 19th 07 06:55 PM
Delete row if value in Column X is 0? CapitolMike Excel Programming 1 January 22nd 04 03:27 PM


All times are GMT +1. The time now is 10:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"