Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
fak119
 
Posts: n/a
Default Deleting Rows

For a Macro novice...

Is there an easy macro that deletes rows when a particular cell has the
value 0 (zero)?

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Don Guillett
 
Posts: n/a
Default Deleting Rows

try
Sub deletezerorows()
Application.DisplayAlerts = False
On Error Resume Next
vlr = Cells(Rows.Count, "d").End(xlUp).Row
With Range(Cells(2, "D"), Cells(vlr, "D"))
.AutoFilter Field:=1, Criteria1:="0"
..SpecialCells(xlCellTypeVisible).Delete
.AutoFilter
End With
Application.DisplayAlerts = False
End Sub

--
Don Guillett
SalesAid Software

"fak119" wrote in message
...
For a Macro novice...

Is there an easy macro that deletes rows when a particular cell has the
value 0 (zero)?

Thank you



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
Deleting All Empty Rows bodhisatvaofboogie Excel Discussion (Misc queries) 3 May 18th 06 12:36 PM
resetting last cell jagdish.eashwar Excel Discussion (Misc queries) 11 March 31st 06 02:06 AM
stop users from deleting rows wAyne Excel Discussion (Misc queries) 2 February 4th 06 05:57 PM
Deleting rows in a macro in Excel THEFALLGUY Excel Discussion (Misc queries) 4 December 23rd 05 01:59 PM
Deleting rows containing common data gcotterl Excel Discussion (Misc queries) 1 January 4th 05 12:58 AM


All times are GMT +1. The time now is 09:41 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"