Thread: Deleting #N/A
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JulieD JulieD is offline
external usenet poster
 
Posts: 618
Default Deleting #N/A

Hi Merlin

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

Cheers
JulieD


"Merlin" wrote in 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 wit hanalphabeticcharacter.

Do I need to change the variable type, or how do I do fix
this? Any help would be appreciated.