It is designed to test multiple conditions simultaneously and return TRUE only if all the conditions are met.
If any condition is not met AND will return FALSE.
The AND function is a good way to avoid complicated formulas that involve manynested IFs.
Each “logical” is a condition that must be TRUE.
The arguments provided to the AND function can be constants, cell references, or logical expressions.
Notice that text values used in comparisons must be enclosed in double quotes ("").
Otherwise, the result should be “Deny”.
IF this AND that
The worksheet below shows a variation of the example above.
The formula in cell D5 is:
Notice that the AND function isnot case-sensitive.
Because AND returns TRUE or FALSE, it is a perfect fit for conditional formatting.
Example - AND with a range
It is possible to use AND with a range of values.
In Excel 2021 or later, the formula will “just work” without special handling.
In the example above, the AND function is used inside the IF function as the logical test.
This formula will return “Pass” only if the score for all six subjects is greater than 65.
Otherwise, the result is “Fail”.
See alsoMust pass 4 out of 6 subjects.
More than one condition can be tested by nesting IF functions.
OR returns TRUEif any condition is TRUE.
If all conditions are FALSE, the OR function returns FALSE.
If neither is TRUE, XOR also returns FALSE.
NOT Function
The Excel NOT function returns the opposite of a given logical or Boolean value.
When given TRUE, NOT returns FALSE.
When given FALSE, NOT returns TRUE.
Use the NOT function to reverse a logical value.