The AND function evaluates two conditions and returns the logical value True if both are true, and the logical value False otherwise.
AND(
<condition1>,
<condition2>
)
- condition1: First condition to evaluate.
- condition2: Second condition to evaluate.
The AND function returns a Boolean (True or False).
This function only accepts two arguments (two conditions to evaluate). If you want to evaluate more than two conditions, you can resort to nesting some AND functions within others or, preferably, use the AND operator (&&) -see example below-.
In this example we want to check if the product sold is "A" and its price is greater than € 1000:
In this second example we want to evaluate three conditions: that the product sold is "A", that the price is greater than € 1000 and that the month in which the sale took place was November, for which we resort to nesting two AND functions:
The alternative is to use the AND operand, which makes the expression simpler: