Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find/Delete skipping rows
Hello:
Not sure how to resolve this. I'm running this bit of code to delete rows that contain a 0 value if the Registration Fee is Not Applicable. It works for the most part, but where it misses rows is when there are two (or more) consecutive rows with a 0 value. I know this is because the next "MyCell" becomes the current once the row has been deleted. Can anyone help resolve this? Thank you! Steven Set FoundCell = SrcHdrRng.Find(What:="Registration Fee") For Each MyCell In Range(FoundCell.Address, Cells(SrcLast, FoundCell.Column).Address) If MyCell.Value = "NotApplicable" Then If MyCell.Offset(0, 1).Value = 0 Then MyCell.EntireRow.Delete End If End If Next |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find and delete rows macro | Excel Discussion (Misc queries) | |||
Find and delete all other rows | Excel Discussion (Misc queries) | |||
Find & Delete Rows | Excel Programming | |||
find and delete rows | Excel Programming | |||
Find according to sheet 2, Delete rows in COL A | Excel Programming |