Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm having a problem when DELETING a row that I don't want ... it skips the
next row. Here's the code: Dim cell As Range For Each cell In Worksheets("sheet1").Range("A1:A5") If Not (cell.Text Like "Y") Then cell.EntireRow.Delete End If Next Here's the data set: A 1 Y 2 N 3 N 4 Y Cell A2 is deleted, but A3 is not deleted. Apparently, after deleting Cell A2, Cell A3 assumes that position and it moves to Cell A4. Any ideas how to resolve this? Thanks. Gary |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
Can an If statement answer an If statement? | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions |