Logical expression for excel..

81shelly

New Member
Joined
Jul 25, 2007
Messages
24
How could you put this sequence in excel..

If A AND B are true return x if false return z

OR IF C>=D is true return y if false return z

Is it possible to put the whole thing on one formula?

Thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,258
Yes, but I think we'd need to understand the logic better.

How do you define that A and B are true ?

If they are both true, what if C>+D is also true ?

If the decision process is as follows, then you can write a formula for it -
If A AND B are both true, return X.
If A AND B are not both true, but C>+D is true, return Y.
Otherwise, return Z.

If this isn't the correct logic, you can still write a formula for it, but you'd need to be clear about what the logic is.
 

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,258
Jonmo1 - I don't think your solution addresses the implied requirement from the OP to return z in any occurrence of A and B not being true.
 

81shelly

New Member
Joined
Jul 25, 2007
Messages
24
thanks thats exactly the way i wanted it..
 

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
Sure it does. If Either A or B is False, it moves on to the next IF, If C>=D - if that is not true, it returns "z"
 

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,258
jonmo1 - it's clearly what 81shelly wanted, but it's not what he said he wanted in the OP, which says
If A AND B are true return x if false return z

Anyway well done for correctly interpreting their request !
 

Forum statistics

Threads
1,181,398
Messages
5,929,739
Members
436,686
Latest member
chanmeggichan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top