Formula with 3 conditions

T

txm49

Need a formula whereby three conditions are met to return a result.
For example, If A1>0 and A2>0 and A3>0, then F1+F2. If A1<0 and A2>0 and
A3>0, then F1+F3, etc.
 
N

nathan_savidge

=if(and(a1>0,a2>0,a3>0),f1+f2,if(and(a1<0,a2>0),f1+f3))

Somthing like that, havent tested it. Just saw your post while looking for
my own answer.
 
P

Pete_UK

Not sure what you mean by "etc." - do you have many other conditions?
With 3 binary variables you could have up to 8 different combinations,
and more if A1=0 is a third state that you want to check for.

Anyway, the first part of your problem can be achieved like this:

=IF(AND(A1>0,A2>0,A3>0),F1+F2,IF(AND(A1<0,A2>0,A3>0),F1+F3,"etc"))

Hope this helps.

Pete
 
M

Mike H

There are a lot of potential combinations here, can you define and quantify
etc?

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top