Beruflich Dokumente
Kultur Dokumente
Functions AND – OR
Condition (https://www.excel-exercise.com/condition/) by Frédéric LE GUEN (https://www.excel-exercise.com/author/konga/)17 June 2020 14:38 (17 June 2020)
Functions AND and OR are 2 logic functions that help you to create sophisticate logical tests.
Basically, with a logical test you compare 2 items only. But if you want to create a test with more than 1 condition, you must
use this function. Examples at the bottom of this article.
AND function
A condition AND returns TRUE if and only if all tests in parenthesis are true.
For instance, you have a list of hotels with different criteria like the number of stars (classification), the price of the menu,
...
So the formula is
=AND(B2>=3,C2<=35,E2="Yes")
As you can see, if test returns TRUE only if all the arguments of the function are TRUE.
https://www.excel-exercise.com/function-and-or/ 1/4
11/23/2020 Functions AND and OR in Excel - Examples and Exercises
OR function
A condition OR returns TRUE if one (or more) tests of the function is true.
XOR function
This is a function available only for Excel 2013 and up but is used is very limited. This function is generally useful for
electronic projects.
Have a look at this article (https://www.excel-exercise.com/function-xor/) if you want to learn more about it.
https://www.excel-exercise.com/function-and-or/ 2/4
11/23/2020 Functions AND and OR in Excel - Examples and Exercises
Answer
The answer for the question 1 is
=AND(E2="Married",F2=1)*1
=OR(E2="Single",E2="Divorced")*1
https://www.excel-exercise.com/function-and-or/ 3/4
11/23/2020 Functions AND and OR in Excel - Examples and Exercises
=OR(E2="Married",D2>75000)*1
=AND(C2="Man";E2="Single";F2=0)*1
=AND(C2="Woman";OR(F2=1;F2=2))*1
=AND(OR(E2="Married",E2="Relationship"),D2>=50000,F2>=2)
Related posts
https://www.excel-exercise.com/function-and-or/ 4/4