Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default MACRO TO DELETE ROW IF CELL VALUE IS ZERO

I need macro which should go through in column "E2:E" of sheet
("DATA") and if finds any cell value = 0 then it should delete that
entire row. Note that I have heading in cell "E1"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default MACRO TO DELETE ROW IF CELL VALUE IS ZERO

Somthing Like


Sub DeleteZero()

Worksheets("Data").Activate
Range("E2").Select

Do
If ActiveCell.Value = "0" Then
ActiveCell.EntireRow.Delete Shift:=xlShiftUp
ElseIf ActiveCell.Value < "0" Then
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub

"K" wrote:

I need macro which should go through in column "E2:E" of sheet
("DATA") and if finds any cell value = 0 then it should delete that
entire row. Note that I have heading in cell "E1"

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
Macro Delete cell if value Sojo Excel Worksheet Functions 3 October 13th 08 07:35 PM
How do I creat a macro to delete the first 20 cell characters Bobo-ack Excel Worksheet Functions 5 April 20th 07 03:00 AM
macro - delete row if cell contains string [email protected] Excel Programming 11 March 17th 06 12:39 AM
create macro - if cell is 0 delete row pywhacket Excel Worksheet Functions 1 March 15th 06 03:55 PM
Delete Row Macro - if cell $5000 Danny Excel Worksheet Functions 1 October 25th 05 07:52 PM


All times are GMT +1. The time now is 10:28 PM.

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"