IsError() Not Working

M

mike

In the following code the IsError function is returning False when the
cell contains #N/A. Any idea on what I'm doing wrong?

Do Until IsEmpty(ActiveCell.Offset(0, 5).Value)
If IsEmpty(ActiveCell.Value) And Not
IsEmpty(ActiveCell.Offset(0, 13).Value) Then 'if price is empty, and
Bloomberg price is not
If Not IsError(ActiveCell.Offset(0, 13).Value) Then
'fill column V only if V is empty
If IsEmpty(ActiveCell.Value) Then
ActiveCell.Value = ActiveCell.Offset(0, 13).Value
End If
End If
End If
Loop
 
S

steve

Mike,
IsError(Range("A1")) worked for me whether #N/A was a text entry or
the result of a formula.

Suggest you remove the '.Value' part
If Not IsError(ActiveCell.Offset(0, 13)) Then
 

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

Top