Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 312
Default IsError Formula

Hello everyone. I'm trying to make a bunch of my formulas more simple
to understand and audit. I use the IsError function a lot to remove
N/A errors during a Lookup. Is there a cleaner way to replace an N/A
with a Zero? Below is an example. It seems crazy to double the
length of the entire formula to simply remove an N/A error. Any
ideas?

=IF(ISERROR(Data!K5*INDEX(Price!$A$3:$BI$200,MATCH (Data!L5,Price!$A$3:$A$200,0),MATCH($C5,Price!$A$3 :$BI$3,0))),0,Data!K5*INDEX(Price!$A$3:$BI$200,MAT CH(Data!L5,Price!$A$3:$A$200,0),MATCH($C5,Price!$A $3:$BI$3,0)))

Thank you!!

-Steph
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default IsError Formula

Hi Steph
for storing a variable have a look at
http://makeashorterlink.com/?J32E23767
(option 2+3 - the latter one reposted below)
-----
Public Function V(Optional vrnt As Variant) As Variant
'
' Stephen Dunn
' 2002-09-12
'
Static vrntV As Variant
If Not IsMissing(vrnt) Then vrntV = vrnt
V = vrntV
End Function
------

use it in your formula as follows:
=IF(ISERROR(V(Data!K5*INDEX(Price!$A$3:$BI$200,MAT CH(Data!L5,Price!$A$3
:$A$200,0),MATCH($C5,Price!$A$3:$BI$3,0)))),0,V())

--
Regards
Frank Kabel
Frankfurt, Germany


Steph wrote:
Hello everyone. I'm trying to make a bunch of my formulas more

simple
to understand and audit. I use the IsError function a lot to remove
N/A errors during a Lookup. Is there a cleaner way to replace an N/A
with a Zero? Below is an example. It seems crazy to double the
length of the entire formula to simply remove an N/A error. Any
ideas?


=IF(ISERROR(Data!K5*INDEX(Price!$A$3:$BI$200,MATCH (Data!L5,Price!$A$3:$
A$200,0),MATCH($C5,Price!$A$3:$BI$3,0))),0,Data!K5 *INDEX(Price!$A$3:$BI
$200,MATCH(Data!L5,Price!$A$3:$A$200,0),MATCH($C5, Price!$A$3:$BI$3,0)))

Thank you!!

-Steph


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
adding =if(iserror to formula KC Excel Discussion (Misc queries) 6 August 27th 09 04:30 PM
Formula Help - Lookup, if, iserror?? Ash Excel Discussion (Misc queries) 9 November 7th 08 05:08 PM
Adding ISERROR to formula Pierre Excel Worksheet Functions 3 October 8th 07 07:08 PM
Using iserror in formula forest8 Excel Discussion (Misc queries) 1 September 2nd 07 03:51 AM
Using ISERROR to Solve #DIV/0 in a formula Leigh Douglass Excel Worksheet Functions 13 August 23rd 07 06:12 PM


All times are GMT +1. The time now is 10:30 PM.

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

About Us

"It's about Microsoft Excel"