Testing for Errors simple function.

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
 
S

Stephen Bye

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

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