View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stephen Stephen is offline
external usenet poster
 
Posts: 106
Default Conditoinal Row Delete

Hi Folks,

The code below works fine to hide the given row but I'd really like to
delete the row and i can't seem to make ".Cells(x, "F").EntireRow.Delete"
work for me.

LastRowOfData = .Cells(.Rows.Count, "F").End(xlUp).Row
For x = 11 To LastRowOfData - 1
If .Cells(x, "F").Value = 0 Then
.Cells(x, "F").EntireRow.Hidden = True
End If
Next

What am I missing?

TIA!