LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Deleting multiple rows contain 0 in excel 2000

Sub Find_0()
Dim rng As Range
Dim what As Long
With ActiveSheet.UsedRange
what = 0
Set rng = .Find(what:=what, _
After:=Range("A1"), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not rng Is Nothing Then
Do
Rows(rng.Row).Delete
Set rng = .FindNext(.Range("A1"))
Loop Until rng Is Nothing
End If
End With

--
Regards,
Tom Ogilvy





"Cathy" wrote in message
...
I have a rather large spreadsheet and need to delete multiple rows with
contain a value of 0. I ran a macro which worked, but it deleted not only
rows which contained 0, but all other rows which contained figures has a

0.
 
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 Multiple Blank Rows Diabolo_Devil[_2_] Excel Discussion (Misc queries) 6 March 12th 10 03:20 PM
Deleting a rows from multiple worksheets School Teacher Excel Worksheet Functions 0 July 6th 05 06:52 PM
deleting multiple rows Pablo Excel Discussion (Misc queries) 4 January 27th 05 07:18 PM
deleting multiple rows with multiple criteria Pablo Excel Programming 3 January 27th 05 02:04 AM
Inserting & Deleting rows can take ages in Excel 2000 MJBDeane Excel Programming 4 November 27th 03 01:11 PM


All times are GMT +1. The time now is 12:50 PM.

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

About Us

"It's about Microsoft Excel"