#NUM checking

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,
I wrote a sub procedure that runs on a column(using 'offset') of
data(Numbers calculated out of a formula) and checks a validity of them. in
one cell of that column i recieve a "#NUM" error.
How can i relate to that in my code? How can i check it and skip any entry
that returns any kind of "#nnn" error?
Thanks a lot.....
Lp12
Im using Excel2003.
 
You can use the IsError function to check the the cell value: Assuming you
have the value of the cell in the VBA variable CellVal you could do something
like this:

If IsError(CellVal)
' put in code here to handle the error - ignore the value or replace it
with something
Else
' your existing code would go here
End If
 

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