Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 08:07:31 +0000



Post From: How do I write spreadsheet code utalizing"IF"

[2014-04-15 13:42:20]
MotoMoto - Posts: 47
$j$26 is the place to modify the quantity.

If I am reading it right -
If the first line is true - you will buy 2 contracts, then if the next line is ALSO true you wish to buy an additional contract

You could output a value in Col O of 2,3 or 0 and then test to see if this is what you want.

=if(OR(AND(AA3>AG3,AA4<AG4,AG3>AC3,AG3>AE3,AG3>AI3),AND(AA3>AI3,AA4<AI4,AI3>AC3,AI3>AE3,AI3>AG3)),if(AND(AA3>AC3,AA4<AC4,AC3>AE3,AC3>AG3,AC3>AI3)),3,2),0)

alternatively you might be asking

=if(OR(AND(AA3>AG3,AA4<AG4,AG3>AC3,AG3>AE3,AG3>AI3),AND(AA3>AI3,AA4<AI4,AI3>AC3,AI3>AE3,AI3>AG3)),if(AND(AA3>AC3,AA4<AC4,AC3>AE3,AC3>AG3,AC3>AI3)),1,2),0)
Date Time Of Last Edit: 2014-04-15 13:44:49