View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default EntireRow.Delete only removing half of the rows

hi KelliInCali

You not start on the bottom

See Examples to delete on my site
http://www.rondebruin.nl/delete.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"KelliInCali" wrote in message ...
Hello.. The following loop is only deleting half of the rows it should be
targeting. It deletes from the bottom of the selection up, but only half of
the records. If I back up and step into it again, it deletes half again of
the remaining.

Can anyone tell me what I'm missing? Tks, Kelli

Set tbl = ActiveCell.CurrentRegion
tbl.Offset(1, 0).Resize(tbl.Rows.Count - 1, tbl.Columns.Count).Select

For Each rngCurrentCell In Worksheets("Floor").Range("H:H").Cells
If rngCurrentCell.Value < 0.01 Then
rngCurrentCell.EntireRow.Delete
End If
Next