Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
how can I build an If statement that answers the following; If A+B<0 then
chose A only if A is greater than 0, otherwise chose B, only if B is greater than zero, otherwise 0. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=IF(A1+B1<0,IF(A10,A1,IF(B10,B1,0)),0)
-- --- HTH Bob (change the xxxx to gmail if mailing direct) "profmorse" wrote in message ... how can I build an If statement that answers the following; If A+B<0 then chose A only if A is greater than 0, otherwise chose B, only if B is greater than zero, otherwise 0. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Another solution
=if(a+b<0,max(a,0),max(b,0)) "profmorse" wrote: how can I build an If statement that answers the following; If A+B<0 then chose A only if A is greater than 0, otherwise chose B, only if B is greater than zero, otherwise 0. |
#4
![]() |
|||
|
|||
![]()
profmorse
=--IF(and(A1+B1<0,MAX(A1:B1)0),MAX(A1:B1)) happy holidays hohoho..:) romelsb @ banter Quote:
|
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Just another option,
=((A1+B1)<0)*MAX(A1,B1,0) -- HTH Sandy Retired for Work But hopefully not from Life with @tiscali.co.uk "profmorse" wrote in message ... how can I build an If statement that answers the following; If A+B<0 then chose A only if A is greater than 0, otherwise chose B, only if B is greater than zero, otherwise 0. |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes, that would work just as well - both a1 and b1 cannot be positive and
meet the first condition - and if both of them are negative you will still get zero as an answer "Sandy Mann" wrote: Just another option, =((A1+B1)<0)*MAX(A1,B1,0) -- HTH Sandy Retired for Work But hopefully not from Life with @tiscali.co.uk "profmorse" wrote in message ... how can I build an If statement that answers the following; If A+B<0 then chose A only if A is greater than 0, otherwise chose B, only if B is greater than zero, otherwise 0. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple IF statements or a better method ? | Excel Discussion (Misc queries) | |||
2 IF Statements not mutually exclusive | Excel Discussion (Misc queries) | |||
UDFunctions and nested If-the-else statements | Excel Worksheet Functions | |||
Linking two IF statements together | Excel Discussion (Misc queries) | |||
Nested IF statements | Excel Worksheet Functions |