Excel Nested IF Statement

Is such a nested if statement workable?  As written it does not work.  But the idea is if the calculation is an error (cell does not have a value to calculate), "Error", if the calculation has a negative result, "Negative Value", else the calculation result..

IF(ISERROR($Y2-$X2),"ERROR",IF($Y2-$X2)<0, "NEGATIVE TIME",$Y2-$X2)))

What is wrong with the formula, and/or is there a better way to do it?  Thanks.
LVL 7
tomfarrarAsked:
Who is Participating?
 
Bill PrewCommented:
Without digging too deep, I do see a paren problem, try:

IF(ISERROR($Y2-$X2),"ERROR",IF($Y2-$X2<0, "NEGATIVE TIME",$Y2-$X2))


»bp
0
 
tomfarrarAuthor Commented:
So simple, and so wrong on my part.  Thank you Bill. - Tom
0
 
Bill PrewCommented:
Welcome (we've all been there, those compound formulas can be tricky...).


»bp
0
 
tomfarrarAuthor Commented:
A set of "sharp eyes" fixed my formula.  Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.