Delete Rows

  • Thread starter Thread starter STEVEB
  • Start date Start date
S

STEVEB

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
 
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
 
Back
Top