Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
General programming help
I'm trying to use the code below to delete rows from a sheet. The problem is
that as it deletes a row, it then skips the next one. How can I create a list of the rows to be deleted and delete them all at once after the For loop? Set ColA = Intersect(Sheet1.Columns("A"), Sheet1.UsedRange) For Each cell In ColA If cell.Value = Empty And Not cell.Offset(0, 1).Value = "Weekend Diff" Then cell.EntireRow.Delete shift:=xlUp End If Next cell |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
General | Excel Discussion (Misc queries) | |||
General | Excel Discussion (Misc queries) | |||
Format: General - Text - General | Excel Worksheet Functions | |||
general | Excel Discussion (Misc queries) |