Hello all -
I would be very grateful for any help with the following:
A very helpful board member, jtakw, helped put together the following:
=IF(OR(BB2="",AND($AR2="x",OR($AZ2={"L","S"}),$AV2="O",OR(H3<$J2,H3>$I2))),"",IF($AR2="x",IF(AND($AZ2="L",J3>$BF2),IF(OR($AV2={"C","O"}),K3-$BB2,IF($AV2="B",K3-$BB2,IF(AND($AZ2="S",OR($AV2={"C","O","B"}),I3<$BF2),$BB2-K3,IF(AND($AZ2="L",J3<=$BF2),$BF2-$BB2,IF(AND($AZ2="S",I3>=$BF2),$BB2-$BF2,""))))))))
This formula worked, but was producing FALSE errors. I traced this to my sample data having cells that did indeed breech certain limits that were not accounted for in this (very good and useful) formula above. My fault in not seeing the pitfall beforehand. So what I did, was create the following to handle these exceptions:
=IF(BB2="","",IF(AND($AR2="x",$AZ2="L",$AV2="C",H3<$J2),H3-$BB2,IF(AND($AR2="x",$AZ2="L",$AV2="O",H3<$J2),H3-$BB2,IF(AND($AR2="x",$AZ2="S",$AV2="C",H3>$I2),$BB2-H3,IF(AND($AR2="x",$AZ2="S",$AV2="O",H3>$I2),$BB2-H3,"")))))
I believe this now handles the exceptions in the sample data, but is, of course, missing inclusion in Jtakw's overall formula.
Might someone have thoughts on how to merge the two?
Thanks so much for the help, and again to jtakw, for setting me on the right path.
I would be very grateful for any help with the following:
A very helpful board member, jtakw, helped put together the following:
=IF(OR(BB2="",AND($AR2="x",OR($AZ2={"L","S"}),$AV2="O",OR(H3<$J2,H3>$I2))),"",IF($AR2="x",IF(AND($AZ2="L",J3>$BF2),IF(OR($AV2={"C","O"}),K3-$BB2,IF($AV2="B",K3-$BB2,IF(AND($AZ2="S",OR($AV2={"C","O","B"}),I3<$BF2),$BB2-K3,IF(AND($AZ2="L",J3<=$BF2),$BF2-$BB2,IF(AND($AZ2="S",I3>=$BF2),$BB2-$BF2,""))))))))
This formula worked, but was producing FALSE errors. I traced this to my sample data having cells that did indeed breech certain limits that were not accounted for in this (very good and useful) formula above. My fault in not seeing the pitfall beforehand. So what I did, was create the following to handle these exceptions:
=IF(BB2="","",IF(AND($AR2="x",$AZ2="L",$AV2="C",H3<$J2),H3-$BB2,IF(AND($AR2="x",$AZ2="L",$AV2="O",H3<$J2),H3-$BB2,IF(AND($AR2="x",$AZ2="S",$AV2="C",H3>$I2),$BB2-H3,IF(AND($AR2="x",$AZ2="S",$AV2="O",H3>$I2),$BB2-H3,"")))))
I believe this now handles the exceptions in the sample data, but is, of course, missing inclusion in Jtakw's overall formula.
Might someone have thoughts on how to merge the two?
Thanks so much for the help, and again to jtakw, for setting me on the right path.