Thread: Delete Rows
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Delete Rows


Assume your formulas are in column C

Dim rng as Range
On Error Resume Next
set rng = Columns(3).SpecialCells(xlFormulas,xlErrors)
On Error goto 0
if not rng is nothing then
rng.Entirerow.Delete
End if


--
Regards,
Tom Ogilvy


"STEVEB" wrote in message
...
Hi All,

I was wondering if anyone could help me with a simple Macro code for
Excel 97 for deleting rows. After I do I VLOOKUP, I would like a MACRO
to automatically delete all rows that come back as "#N/A". Does anyone
have any suggestions?

Thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/