How to Return Yes When Any Condition is Met in Excel using IF and OR
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.
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.
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.
Click on the cell where you want the "Yes" or "No" result to appear.
Type the following formula into the formula bar: =IF(OR(F17>99,G17>4,H17>4),"Yes","No")
Press the Enter key to apply the formula and view the result based on your current data.
Use IF and OR to Return "Yes" or a Blank Cell
If you prefer to keep your spreadsheet clean by leaving the cell empty when conditions aren't met, use this variation of the formula.
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. Open your file: Launch WPS Spreadsheet and open the document containing your data.
- 2. Enter the formula: Click the target cell and type your =IF(OR(...)) formula in the formula bar.
- 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.

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").




