Easy question: Have macro ignore #N/A

  • Thread starter Thread starter Paul987
  • Start date Start date
P

Paul987

How do you ignore #n/A values with macros? Can I have it only look at
numbers? I just need a quick way to tell it to move along, and not
worry about the line with an #N/A value. TIA
Paul
 
If IsError(ActiveCell.Value) Then
MsgBox "error"
End If


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
set rng = columns(1).Specialcells(Formulas,xlNumbers)
for each cell in rng

or

for each cell in selection
if not iserror(cell) then

end if
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top