Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default IsError() Not Working

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default IsError() Not Working

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

--
sb
"mike" wrote in message
om...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default IsError() Not Working

It works for me. Maybe you are looking at the wrong cell.

--
Regards,
Tom Ogilvy

"mike" wrote in message
om...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF, OR, ISERROR? FJ Excel Worksheet Functions 7 November 6th 09 04:01 AM
Iserror not working as expected NathanG Excel Worksheet Functions 5 February 1st 07 05:31 PM
ISERROR Latika Excel Worksheet Functions 1 July 18th 06 04:19 PM
Iserror kelljeff Excel Discussion (Misc queries) 2 May 17th 06 03:02 PM
ISERROR formula in VBA not working for me Cesar Zapata[_2_] Excel Programming 0 July 10th 03 05:18 PM


All times are GMT +1. The time now is 01:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"