logo
search
Function Problems

How to Return Yes When Any Condition is Met in Excel using IF and OR

Maira MehtabMaira Mehtab Sep 27, 2026 870 views

Question details

The user needs an Excel formula using the IF and OR functions to check three numeric conditions, returning "Yes" if at least one condition is true, and "No" or a blank space if all conditions are false.

Product
Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Evaluating multiple numeric data points in a spreadsheet to check if any specific threshold is met and returning a custom text output based on the result.
Observed behavior
Requires the correct nesting syntax for the OR logical test within an IF statement to return specific string values based on the condition results.
Before you start

Ensure the cells you are evaluating contain numeric data and verify the exact cell references (e.g., F17, G17, H17) before applying the formula to avoid calculation errors.

Solution 1Recommended

Use IF and OR to Return "Yes" or "No"

This method will display "Yes" if any condition within the OR function is met, and "No" if none of them are met.

The IF function lets you make logical comparisons between a value and what you expect. By nesting the OR function inside the IF function, you can evaluate multiple conditions simultaneously. If any single condition inside the OR bracket evaluates to TRUE, the IF function returns your first specified value.

1
Select the target cell

Click on the cell where you want the "Yes" or "No" result to appear.

2
Enter the formula

Type the following formula into the formula bar: =IF(OR(F17>99,G17>4,H17>4),"Yes","No")

3
Apply the formula

Press the Enter key to apply the formula and view the result based on your current data.

Syntax breakdown: The OR function checks if F17 is greater than 99, G17 is greater than 4, or H17 is greater than 4. If any are true, IF outputs 'Yes'. Otherwise, it outputs 'No'.
Efficient Spreadsheet Data Analysis

Use WPS Spreadsheet to Quickly Process IF and OR Formulas

WPS Spreadsheet fully supports Excel's IF, OR, and other logical functions, allowing you to seamlessly process complex conditional formulas. Enjoy a familiar interface and comprehensive calculation support.

  1. 1. Open your file: Launch WPS Spreadsheet and open the document containing your data.
  2. 2. Enter the formula: Click the target cell and type your =IF(OR(...)) formula in the formula bar.
  3. 3. Drag to fill: Use the fill handle at the bottom-right corner of the cell to easily apply the formula to the rest of the column.
100% compatible with Microsoft Excel formulas, functions, and formatsBuilt-in formula syntax hints and error checkingLightweight, free to use, and fast to launchFamiliar user interface requires no learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Can I check more than three conditions with the OR function?

Yes, the OR function in Excel and WPS Spreadsheet can evaluate up to 255 conditions. Just separate each logical test with a comma inside the OR parentheses, like OR(A1>5, B1>10, C1>15, D1>20).

Why is my formula returning a #NAME? error instead of Yes or No?

Ensure your text outputs are enclosed in double quotes (e.g., "Yes" and "No"). If you miss the quotation marks, the spreadsheet assumes you are referencing a named range and will return a #NAME? error because it cannot find that name.

How do I return Yes if ALL conditions are met instead of ANY?

To check if all conditions are strictly true, replace the OR function with the AND function. Your formula should look like: =IF(AND(F17>99,G17>4,H17>4),"Yes","No").