Excel AND and OR Functions Combined: How to Use Them

Formulas & functions · Updated November 18, 2026

Yes. You can combine Excel’s AND and OR functions by nesting one inside the other. For example, with a score in B2, a training status in C2, and an approval status in D2, this formula returns TRUE when the score is at least 70 and either training or approval is marked Yes: =AND(B2>=70,OR(C2="Yes",D2="Yes")). AND requires every condition to be true; OR requires at least one condition to be true.

What combining AND and OR means

AND and OR are logical functions: they evaluate conditions and return either TRUE or FALSE. Combining them lets you express rules with more than one layer, such as “the customer meets the minimum spend and has either a membership or a referral.” The functions do not have to be used together, but nesting them is a practical way to make a single formula represent that kind of rule.

The key is to translate the rule into groups. In the example above, the score requirement is mandatory, so it belongs in AND. The training and approval requirements are alternatives, so they belong together in OR. In plain language, the rule is:

  • The score must be 70 or higher.
  • At least one of training or approval must be Yes.

That structure is different from requiring all three conditions. If you put the two Yes checks directly inside AND, both would have to be true. If you put all three conditions inside OR, a high score alone or either Yes status alone would be enough. The nesting and placement of parentheses determine the logic.

How the functions work in Excel

AND evaluates every condition supplied to it and returns TRUE only when all of them are true. OR returns TRUE when at least one supplied condition is true. Either function can take multiple logical tests, and one logical function can be placed inside another. Excel evaluates the innermost function first, then uses its TRUE or FALSE result in the outer function.

For the opening example, OR first checks whether C2 is Yes or D2 is Yes. It returns TRUE if either check succeeds. AND then checks that result alongside the score test. If the score is 70 or more and the OR result is TRUE, the overall result is TRUE. Otherwise, it is FALSE.

Use parentheses to show which conditions belong together. Commas separate arguments in standard English-language Microsoft 365 for Windows settings. Excel installations configured for some other regional settings may use semicolons as argument separators; if a formula with commas is rejected, check the list separator used by that installation. The function names and logic remain the same.

Common formula patterns

A useful way to plan a formula is to write the rule in ordinary language, mark “all” requirements for AND, and mark “any” alternatives for OR. Then build the inner group first. For instance, with a product category in A2 and a price in B2, this formula accepts either of two categories, but only when the price is below 100: =AND(B2<100,OR(A2="Office",A2="School")).

In that layout, B2 contains the price and A2 contains the category. The formula returns TRUE for an Office item priced at 85, and FALSE for a Home item priced at 85 or an Office item priced at 120. The example illustrates that the OR group does not weaken the separate price requirement.

You can also place an AND group inside OR when a rule accepts either of two complete routes. With a region in A2, a sales amount in B2, and a customer type in C2, the following rule accepts either a West-region sale of at least 500 or any Enterprise customer: =OR(AND(A2="West",B2>=500),C2="Enterprise").

Here, the layout is A2 for region, B2 for sales, and C2 for customer type. The inner AND requires both West and a sale of at least 500; the outer OR accepts that pair or the Enterprise status. Parentheses make those two routes distinct. This pattern is useful when a policy has several alternative paths, each with its own requirements.

Worked example: eligibility and a readable result

Suppose a worksheet tracks applicants. A2 contains the applicant’s name, B2 their score, C2 whether required training is complete, and D2 whether a manager approved an exception. The eligibility rule is a score of at least 70 plus either completed training or manager approval. With that layout, enter the following in E2: =AND(B2>=70,OR(C2="Yes",D2="Yes")).

If B2 is 82, C2 is No, and D2 is Yes, the result is TRUE: the score qualifies and the approval satisfies one of the two alternatives. If the score is 68 with the same status values, the result is FALSE because approval does not replace the score requirement. If the score is 82 and both status cells say No, the result is also FALSE.

TRUE and FALSE are useful for checking a rule, but a worksheet may be easier to read with a label. Using the same applicant layout, enter this formula in F2 to show a word instead: =IF(AND(B2>=70,OR(C2="Yes",D2="Yes")),"Eligible","Not eligible").

For the first set of values above, F2 displays Eligible. IF does not change the underlying logic; it selects one result when the test is TRUE and another when it is FALSE. You can fill the formula down for other applicants, provided each row uses the corresponding score and status cells. Consider labeling the columns clearly so another person can understand what the decision represents.

Choosing which function belongs on the outside

There is no rule that AND must always be outside OR. Start with the meaning of the complete rule. If a condition must always be satisfied, it commonly appears as an argument to the outer AND, while alternative ways to meet another requirement sit inside OR. If either of two complete combinations is acceptable, use an outer OR with separate AND groups inside.

For a more complex policy, separate it into named ideas before writing the formula. For example, “a current member with a large order, or a nonmember with a referral” describes two complete paths. Each path has conditions that must all be true, so each path is an AND group; because either path is acceptable, those groups are joined by OR. This way of reasoning reduces the chance of accidentally making a requirement optional.

When a formula becomes difficult to explain aloud, simplify the rule or split it into helper columns. A helper column can calculate one sub-result, such as “meets score requirement,” while another checks the alternative statuses. The final decision can combine those results. More cells are not automatically worse: a transparent worksheet can be easier to review and maintain than one compact formula with many nested parentheses.

Common mistakes and how to troubleshoot them

  • Using the wrong logical relationship: AND means all included conditions must be true; OR means at least one must be true. Compare the formula with the written rule, not just with the values in one test row.
  • Misplacing parentheses: Parentheses define groups. When Excel reports a formula error, check that each opening parenthesis has a closing one and that each condition is inside the intended function.
  • Text does not match: A test for Yes will not match a cell containing a different word, an unintended space, or another status label. Check the cell’s actual contents and use consistent data entry, such as a drop-down list where appropriate.
  • Numbers stored as text: A value that looks numeric may be stored as text, which can cause comparisons to behave unexpectedly. Check how the data was imported and use consistent numeric values before relying on thresholds.
  • Blank cells: Decide explicitly what a blank means in the business rule. A blank status should not automatically be treated as a valid Yes; test representative blank rows and make the formula require the intended status.
  • Too many nested tests: Long formulas are harder to audit. Break the policy into helper columns, or use clearly labeled intermediate results, especially when someone else will need to maintain the workbook.

When checking a formula, try a small test table that covers each important case: all requirements met, one mandatory requirement missing, neither alternative met, and each alternative met separately. This is more reliable than checking only one row where the answer happens to be TRUE.

Alternatives and compatibility

For a straightforward two-way choice, Excel’s IF function can sometimes express a condition without OR, but nested AND and OR are often clearer when the rule includes several tests. You may also see formulas written with arithmetic or operators that coerce TRUE and FALSE into numbers. Those approaches can be compact, but they may be less readable to people who are not familiar with that style. AND and OR state the intended logic directly.

In Microsoft 365 for Windows, enter the formula in a cell and press Enter. To copy it to other rows, use the fill handle or copy and paste; relative references such as B2 will adjust as the formula moves. On Mac, the same functions and formula logic work, although keyboard shortcuts and some interface details differ. Excel for the web also supports AND and OR, though ribbon layout can vary from the desktop application.

AND and OR are long-standing Excel functions, not functions limited to a new Microsoft 365 release. If a workbook is shared across desktop and web versions, the basic nested formulas in this guide are broadly suitable. The main practical compatibility issue is often regional formula separators or differences in how users enter and maintain data, rather than the availability of these functions.

Frequently Asked Questions

Can I use AND and OR in the same Excel formula?
Yes. Nest one function inside the other to group conditions. Use AND where all tests must pass and OR where one or more alternatives are acceptable. The grouping determines the result.

Does AND or OR go first?
Neither function has to go first. Put the function that represents the inner group inside the other. Choose the order from the rule: alternative complete routes often use OR outside AND groups, while mandatory criteria with alternatives often use AND outside an OR group.

Can I combine AND and OR with IF?
Yes. Use the combined logical test as IF’s first argument, then provide the result for TRUE and the result for FALSE. This lets a cell display labels such as Eligible or Review instead of only TRUE or FALSE.

Why does my combined formula return FALSE?
At least one condition required by the formula may be false, or text and data may not match the test exactly. Check each condition separately against the row, confirm whether the rule means all or any, and inspect spaces, blanks, and numeric values stored as text.

Can OR check several alternatives?
Yes. OR can evaluate more than two logical tests. Keep alternatives that belong to the same part of the rule together, and use parentheses to avoid mixing them with mandatory conditions.

Do AND and OR return words?
No. On their own, these functions return TRUE or FALSE. To show a word or another value depending on the result, use IF around the logical test.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.