View Single Post
  #5   Report Post  
David Biddulph
 
Posts: n/a
Default

"THEFALLGUY" wrote in message
...
"THEFALLGUY" wrote:

I have a scenario that has 5 scenarios, and I need to nest them into one
formula within a single cell:

IF(IX,IF(H<W,X-W,X-H))
IF(I<=X,IF(H=W,I-H,I-W))
IF NEITHER OF THE ABOVE STATEMENTS IS TRUE, THEN RETURN '0'

Here are the five scenarios broken down:
1) H<W, IX
2) H=W, IX
3) H=W, I<=X
4) H<W, I<=X
5) None of the above, so return '0'

Thank you for any help,
THEFALLGUY


All 'U's should be 'W's and all 'V's should be 'X's

I was able to come up with a formula that returns the correct value for
the
first four scenarios, but if the condition does not apply to any of the
first
four scenarios, then instead of returning '0', Excel returns #############
within the cell. I cannot figure our how to get rid of the pound signs.

My formula:
=IF($I431X431,IF($I431=W431,IF($H431<W431,X431-W431,X431-$H431),0),IF($I431<=X431,IF($H431<X431,IF($H431=W 431,$I431-$H431,$I431-W431),0)))


So where do the tests:
IF($I431=W431 and IF($H431<X431
come from?

These weren't in your original criteria.

Your criteria compared I with X (but not with W), and compared H with W (but
not with X).
--
David Biddulph