View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Delete row macro/VB

Hi Dave,

Try:

Sub Tester()
Dim rng As Range
Set rng = Range("C5")
If rng.Value = 0 Then rng.EntireRow.Delete
End Sub


---
Regards,
Norman



"Dave" wrote in message
...
I'm looking for a macro/VB code that will evaluate a cell
and if it meets the criteria, will delete the row.

For example, if cell c5=0, then delete that row.

Can anyone help?