ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Complex Conditional formulas (https://www.excelbanter.com/excel-worksheet-functions/7206-complex-conditional-formulas.html)

Aileyan

Complex Conditional formulas
 
Need to know how to write a formula that combines several conditions. E.g:
IF(AND(E2<0,F2<0,E2<F2),(ABS(F2)-ABS(E2)),8) need to be combined with
IF(AND(E2<0,F20),(ABS(F2)-ABS(E2)) so that I get one result. How do I do
this?

Peo Sjoblom

It doesn't make any sense as written since you want the same result for both
of the formulas,
it can be simplified to

=IF(E2<0,ABS(F2)-ABS(E2),8)


Since you want 8 to be the result if E2 = 0

and you want the result

ABS(F2)-ABS(E2)

( no need for the extra parenthesis )

for both

AND(E2<0,F2<0,E2<F2)

and

AND(E2<0,F20)

that leaves on question, what if F2 is 0?



--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



"Aileyan" wrote in message
...
Need to know how to write a formula that combines several conditions.
E.g:
IF(AND(E2<0,F2<0,E2<F2),(ABS(F2)-ABS(E2)),8) need to be combined with
IF(AND(E2<0,F20),(ABS(F2)-ABS(E2)) so that I get one result. How do I do
this?





All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com