Excel IF Multi-Condition Judgment: Nested and Combined Approaches

Explain the three ways to use IF to evaluate multiple conditions in Excel: combining AND and OR, nested IF for tiered banding, and flat IFS. Include steps, methods for checking boundary values, and troubleshooting common errors.

Key Points of This Article

  • Conditions that must all be met at the same time use IF with AND; if any one condition is enough, use IF with OR. The two can be nested.
  • When the result has three or more tiers, write the stricter conditions first in nested IFs; otherwise high scores will be classified into a lower tier.
  • The commas and quotation marks in formulas must be English half-width characters; Chinese punctuation is a common cause of formula errors.
  • After writing a formula, verify it one by one with boundary values (such as exactly 60 points), which is more reliable than only checking the result of the first row.

When building spreadsheets, an IF that tests just one condition is usually enough, for example "if the score is greater than or equal to 60, mark it as passing." In real work, however, judgments often depend on several factors at once: a sale counts as qualified only if the sales amount meets the target and payment collection is complete, or a score falls within a certain range to earn a particular grade. In these cases, a single condition is not enough, and you need to combine multiple conditions within IF.

This article is for readers who already know how to write a simple IF, but don't yet know how to combine multiple conditions. After reading it, you should be able to tell when AND, OR, nested IF, and IFS each fit, follow the steps to write a multi-condition IF formula in Excel, and check whether the result is correct. The examples use a student grade table; replace the column names and numbers with your own data.

How do I write IF with multiple conditions in Excel? One-sentence answer

One-sentence takeaway: When several conditions must all hold, put them in AND; when satisfying any one of them is enough, use OR; when the result needs three or more categories, use nested IFs or IFS.

Your situationRecommended PracticesCause
Several conditions must be met at the same time.IF plus ANDAND returns TRUE only when all of its arguments are TRUE; the logic is intuitive.
Any one of the several conditions being met is sufficient.IF plus ORTRUE if at least one of them is true.
The results have three or more tiers, and they follow a specific sequence.Nested IFJudge layer by layer; every Excel version supports it.
The categories are numerous, and I'd like the formula to be easier to read.IFSConditions are laid out in sequence, with TRUE as the final fallback; requires Excel 2019 or a newer version
"Both 'and' (and) and 'or' (or) are present."AND and OR nestingUse parentheses to make the order of precedence explicit and avoid confusion about the order of evaluation.

Before You Begin: Confirm These Points First

  • Confirm how boundary values are classified. "Greater than or equal to 60" and "greater than 60" differ by only one equals sign, but a score of exactly 60 would be filed completely differently. Before writing the formula, confirm with the requester which category data exactly equal to a boundary value belongs to.
  • Confirm the order in which conditions are evaluated. A nested IF is checked from top to bottom, and the first condition that matches returns its result. Check the higher score thresholds first, for example "greater than or equal to 90" before "greater than or equal to 60"; otherwise a score of 95 would be classified in the 60-point tier.
  • Distinguish numbers from text. Write numeric conditions directly, such as B2>=60; text conditions must be enclosed in English double quotation marks, such as C2="Yes". Mixing the two will cause the condition to fail.
  • Check that the data is clean. If a cell contains extra spaces, or a number is stored as text, the condition will be evaluated incorrectly. You can first use the TRIM function to remove spaces, or check that the number format is correct.
  • Use English punctuation. Commas, parentheses, and quotation marks in formulas must all be half-width. Chinese commas will prevent Excel from recognizing the formula, which is one of the common causes of errors for beginners.

Steps to Write a Multi-Condition IF Formula in Excel

  1. First, write the judgment rule in one sentence, for example "A score greater than or equal to 60 and homework submitted is a pass, otherwise it is pending review." A clearly stated rule keeps the formula from missing any condition.
  2. In the first cell of the result column, type an equals sign and IF, then start the parentheses with AND, for example =IF(AND(B2>=60,.
  3. Put all conditions that must be met at the same time inside AND, separated by English commas, for example =IF(AND(B2>=60,C2="是"),.
  4. Next, write the return value when the conditions are met, then the return value when they are not, and finally add the closing parenthesis, for example =IF(AND(B2>=60,C2="是"),"通过","待复审").
  5. When you need multiple grade levels, place the next-level IF in the "not met" position to form a nested structure, for example =IF(B2>=90,"优秀",IF(B2>=60,"及格","不及格")). Write the high-score conditions first.
  6. Press Enter to confirm, then test with several typical sets of data, including data exactly at the boundary values and clearly failing data, to confirm that each case returns the correct result.
  7. Double-click the fill handle or drag down to apply the formula to other rows. If the formula references a fixed cell, such as the grading standard in E2, use an absolute reference like $E$2 so the reference does not shift when filled.
  8. If you use IFS instead, list the conditions in the order they should be judged, and finally use TRUE as the fallback result, for example =IFS(B2>=90,"优秀",B2>=60,"及格",TRUE,"不及格").

If your data comes from a PDF report, you can first use the PDF editor in the OmniDoc desktop client to export it to Excel, then write the formulas following the steps above.

Verify each item after completion

After the formulas have been filled in, do not deliver them directly. First, check them against the table below.

Checklist itemsHow do you see it?What should I do if I have a problem?
Boundary valueFind the data equal to 60 and 90, and see which range each one falls into.Check whether the >= and > comparisons match the requirements, and rewrite them if necessary.
Are there any blank results?Filter for blank cells, or check whether the result column contains FALSECheck whether the nested IF statements are missing a return value for the "not satisfied" case
Error valueNote #NAME?, #N/A, #VALUE!#NAME? is mostly caused by a misspelled function name or a version that doesn't support IFS; #N/A commonly appears when IFS lacks a fallback condition; #VALUE! is usually because numbers are stored as text.
Are the brackets balanced?Click into the formula bar, then count the parentheses layer by layer.Missing a closing parenthesis causes an error; add the missing ones level by level.
Does it misalign after filling?Spot-check the citation cells in the rows belowAdd absolute reference symbols to the fixed references, then refill.

The official results depend on the accuracy of the source data. If the data comes from scanned documents or OCR recognition, key figures should be manually verified rather than relying solely on the formula output.

📊 Core Comparison: How to Choose Between AND, OR, Nested IF, and IFS

Writing styleSuitable scenariosWriting Style CharacteristicsPoints to note
IF + ANDPasses only when multiple conditions are all met at the same time.Put the conditions side by side in ANDThe relationship between the conditions can only be "all must be satisfied."
IF + ORAny one of multiple conditions being met is sufficient.Put the conditions side by side in an ORIt's easy to mistakenly use "AND" instead of "OR".
Nested IFDivide into three or more tiers, compatible with older versionsLayers of bracketsReading is difficult when there are many layers, and if the order is written wrong, you will make incorrect judgments.
IFSToo many tiers, I'd like the formula laid out flat.Conditions and results arranged in pairsNeed TRUE as a fallback; older versions of Excel do not support it.

❓ Frequently Asked Questions (FAQ)

1. Can I use AND and OR together in an IF formula?

Yes. Simply use parentheses to clarify the order, for example =IF(AND(B2>=60,OR(C2="是",D2="是")),"通过","复审"), which means passing and at least one of the two items is "yes".

2. Nested IFs go several layers deep—how do you maintain them?

The more levels there are, the harder the formula is to read. When a banding goes beyond three or four levels, you can switch to IFS, or write the banding criteria into a separate lookup table and reference it with a lookup function. Once the lookup table is changed, the formulas do not need to be rewritten one by one.

3. Why does the formula always return FALSE?

There are two common causes: the condition's direction is reversed, or text is being compared with a number. You can enter a single condition in an empty cell, such as =B2>=60, and see whether it returns TRUE or FALSE, then check the conditions one by one.

4. Excel shows #NAME? error — is there a problem with the formula?

In most cases, the function name is misspelled, or your version of Excel doesn't support the function. IFS is a newer function, and older versions will show #NAME?. You can use nested IF instead.

📝 Summary

Core approach to multi-condition IF in Excel: first write the rules clearly. When all conditions must be met, use AND; when any one condition is enough, use OR; for multiple tiers, use nested IF or IFS. After writing the formula, test each boundary value one by one, then fill it down, and check parentheses, references, and data formats. Following this order keeps the formula correct and easy for others to understand.

Open OmniDoc and process your spreadsheet file

Updated 2026-11-29