Thread: Deleting #N/A
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Merlin[_2_] Merlin[_2_] is offline
external usenet poster
 
Posts: 5
Default Deleting #N/A

That worked! I should have thought of that, but I have
used iserror very little.
Thanks!!
-----Original Message-----
I suggest using the if iserror function in the lookup.
example below

=IF(ISERROR(VLOOKUP(#REF!,CSR,2,FALSE))=TRUE,0,VL OOKUP
(#REF!,CSR,2,FALSE))

Regards,
-----Original Message-----
I am trying to delete the #N/As leftover after

converting
a failed lookup function to a value. When the loop

lands
on a cell that is #N/A when I perform the following:

Do Until ActiveCell = "Done"
If ActiveCell = "#N/A" Then
Selection.ClearContents
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

I get a type mismatch error. Help says that "Variable
names must begin with an alphabetic character".

Do I need to change the variable type, or how do I do

fix
this? Any help would be appreciated.
.

.