View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Paul B Paul B is offline
external usenet poster
 
Posts: 709
Default find a value and delete that row

Could be there are no blank cells, or the sheet is protected, try this

Sub Delete_blank()
On Error Resume Next
Intersect(Range("H:H"), ActiveSheet.UsedRange) _
..SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"TUNGANA KURMA RAJU" wrote in
message ...
Mr.Paul,this gave me a runtime error 1004.

"Paul B" wrote:

Give this a try,

Sub Delete_blank()
Intersect(Range("H:H"), ActiveSheet.UsedRange) _
..SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"TUNGANA KURMA RAJU" wrote
in
message ...
I am looking for a macro for..... Find zero values in range H:H of this
w/sheet and delete those entire rows.If no cell in range H:H has zero
value
do nothing.
say if cell H232=0 ,delete row number 232 ,and row 233 to end row will
move
up in the w/sheet.