Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Everyone,
I have a datasheet (a daily report that I get from a system). In this report I have column AE that contains the identifier for that row. Some of the identifiers are DUMMY. These are wrong postings from the system. I have written a following code to delete all rows that have DUMMY in column AE. Sub delete_dummy() Dim Cell As Range For each Cell in Range("AE:AE") If Cell.Value = "DUMMY" Then Cell.EntireRow.Delete End If Next Cell End Sub The code works but it does not delete all the rows containing dummy. I have to run it a few times before all the dummy rows are deleted. I have no idea why that happens and how to fix it so that all the dummy items are deleted in one go. Can someone help me with this. Thanks very much. Regards, -AG |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to delete rows | Excel Discussion (Misc queries) | |||
Can't get Rows to delete in macro | Excel Programming | |||
Macro to delete rows | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming |