>I ran it on some test data and it worked fine. I will take a look at
> it again. Do you have any other code that may be firing as a result of
[quoted text clipped - 63 lines]
>> > > > >
>> > > > > Gordon...
Hi Tom...
The #N/A that I need deleting was being created by an error response to a
vlookup table. By using iserror in my formula the #n/a is now a 1. I think
deleting #n/a's was too problematic. Is it easier to delete rows where a 1
occours in column b, rather than #n/a's?
Thanks
Gordon
> Sub DeleteNA()
> With Activesheet
[quoted text clipped - 71 lines]
> >> > > > >
> >> > > > > Gordon...
Tom Ogilvy - 30 Sep 2006 18:23 GMT
No, it is much easier to delete the #N/A's as I have shown. And then you
don't have to use iserror in your formula. If, in your current situation,
the formula always returns a text value when successful and the number 1
when not, then you could still do
Sub DeleteNA()
With Activesheet
On Error Resume Next
.columns(2).SpecialCells(xlFormulas,xlNumbers).EntireRow.Delete
On Error goto 0
End With
End Sub
so any row with a formula returning a number would get deleted -- if your
formula were like:
=if(iserror(vlookup),1,vlookup)

Signature
Regards,
Tom Ogilvy
> Hi Tom...
>
[quoted text clipped - 83 lines]
>> >> > > > >
>> >> > > > > Gordon...