View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Erik Erik is offline
external usenet poster
 
Posts: 96
Default 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