Testing for Errors simple function.

  • Thread starter Thread starter terryspencer2003
  • Start date Start date
T

terryspencer2003

I want to test a formula for errors using the ISERROR Statememt.
Effectively I want to say:

IF(ISERROR(forumula),0,formula)

However my formula is very large. Repeating it again at the end of
the statement makes it difficult to audit after the fact. Especially
when my formula looks like this:

(SUM(OFFSET('2002'!D$2,MATCH(D$3,'2002'!$C$2:$C$8674,0),26),OFFSET('2002'!D$2,MATCH(D$4,'2002'!$C$2:$C$8674,0)-1,26)))*A6+(SUM(OFFSET('2003'!D$2,MATCH(D$3,'2003'!$C$2:$C$8674,0),26),OFFSET('2003'!D$2,MATCH(D$4,'2003'!$C$2:$C$8674,0)-1,26)))*B6

Is there a way to test for the error without having to repeat the
formula?

TS
 
Put the test in a separate cell.
With your formula in cell1, in cell2 put:
=IF(ISERROR(cell1),0,cell1)
 
Back
Top