View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
steve steve is offline
external usenet poster
 
Posts: 20
Default Delete all Rows in a Variable Range

here is two posibilitys

Sub killme()
Dim r As Range
For Each r In Selection
If r.Column = 10 And r.Value = 0 Then
r.EntireRow.Delete
Next
End Sub

or

Sub killme()
Dim r As Range
For Each r In Selection
If Cells(r.Row, 10) = 0 Then r.EntireRow.Delete
Next
End Sub

-----Original Message-----
How can I delete all Rows in a variable range where the

value in Column J
returns Zero and move all Rows below up. Column J

contains a formula
relating to other values in the same row.

Thanks


.