Compares the two sides and returns TRUE or FALSE.
- Left side
A2- Right side
100100
IF with AND returns Approve only when every required condition is true. Here the amount passes, but manager approval does not, so the request is rejected.
Compares the two sides and returns TRUE or FALSE.
A2100100Compares the two sides and returns TRUE or FALSE.
B2"Yes""Yes"Check if all conditions are true with AND, which returns TRUE only when every test passes.
A2>100The first condition or expression to be evaluated.B2="Yes"The second condition or expression to be evaluated.Returns one value when a condition is true and another when it's false
AND(A2>100,B2="Yes")The condition that you want to test. It can be an expression, a value, or a cell reference."Approve"The value or formula to return if the logical test evaluates to TRUE."Reject"The value or formula to return if the logical test evaluates to FALSE.The amount test returns TRUE and the manager-approval test returns FALSE. AND therefore returns FALSE, and IF selects Reject.
The rows above are ordered from the innermost calculation to the final result. Excel has to finish an inner function before the function around it can use that value. Edit a cell in the grid to see that dependency chain update for real.
The sample spreadsheet is fully editable. Change the formula or any cell it references. The intermediate values recalculate in your browser.
Here is an exercise that uses IF. Type the formula into a real spreadsheet and we will check your answer as you go.
Approve a loan only if credit score > 700 AND income > $50,000.
Open exerciseIf this formula is not doing what you expect, one of these is usually why.
AND requires every condition to be TRUE. If either the amount test or approval test fails, AND returns FALSE and IF uses its rejection branch.
Use OR when any one condition is enough. Use AND when all requirements must pass together.
Text criteria must be quoted and spelled consistently. Hidden spaces can make "Yes " different from "Yes".
Yes. Add more comma-separated tests inside AND; it returns TRUE only when every one of them is true.