View Single Post
  #4   Report Post  
THEFALLGUY
 
Posts: n/a
Default

Mark,
Thank you for your input. However, there are scenarios where the values do
not fall within the two If Statements, and thus should be '0'. The formula
in my second post is producing the correct solution, but it does not produce
clean data for the cells that should have a '0' value.

David

"Mark Hone" wrote:

Hi TheFallGuy,

Given that your two IF statements cover all possibilities with respect to
the relationship between I and X, you could combine them into one statement
as follows:

=IF(IX,IF(H<W,X-W,X-H),IF(H=W,I-H,I-W))

This is basically inserting the second IF statement into the 'value if
false' parameter of the first IF statement.

As far as I can tell from your logic, it is impossible for both statements
to be false so a value of zero need not be returned.

Hope this helps,

Mark


"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<U, IV
2) H=U, IV
3) H=U, I<=V
4) H<U, I<=V
5) None of the above, so return '0'

Thank you for any help,
THEFALLGUY