To use IF with OR in Google Sheets, put OR inside the IF condition: =IF(OR(A2="Open",B2>=100),"Review",""). This returns “Review” if either A2 contains Open or B2 is at least 100; if neither condition is true, it returns a blank cell.
What IF and OR do
IF and OR solve two different parts of a decision. OR checks whether at least one of several tests is true, returning the Boolean value TRUE or FALSE. IF then uses that result to choose what to display: one value when the test is true and another when it is false. Combining them lets a spreadsheet express rules such as “flag this row if it is overdue or urgent.”
The distinction matters: OR by itself does not choose a label or perform an action. For example, =OR(A2="Open",B2>=100) produces TRUE or FALSE. Wrapping it in IF turns that Boolean result into a useful message, number, or other output. IF can return text, numbers, values from other cells, or a blank string.
IF and OR syntax
The general pattern is =IF(OR(condition1,condition2),value_if_true,value_if_false). OR can contain two or more logical tests, and IF evaluates the result OR supplies. The true and false outputs are both required in the standard IF syntax, though one can be an empty string written as two quotation marks.
condition1andcondition2are comparisons that evaluate as TRUE or FALSE, such asA2="Open"orB2>=100.value_if_trueis returned when any OR condition is true.value_if_falseis returned only when every OR condition is false.
Text values in formulas need straight double quotation marks. Comparison operators include = for equal to, <> for not equal to, and >= or <= for greater than or equal to and less than or equal to. Google Sheets formulas commonly use commas between arguments, as in the examples here; spreadsheet locale settings can require semicolons instead.
A basic example with two conditions
Suppose a task list has a status in column A and an amount in column B. You want to flag a row for review if its status is Open or its amount is at least 100. With the status in A2 and amount in B2, enter this in another cell on row 2:
=IF(OR(A2="Open",B2>=100),"Review","")
If A2 is Open and B2 is 40, the result is Review because the first test is true. If A2 is Closed and B2 is 125, the result is also Review because the second test is true. If A2 is Closed and B2 is 40, both tests are false, so the result is blank. Copy the formula down to apply the same rule to other rows; relative references adjust from A2 and B2 to A3 and B3, and so on.
The blank output is useful when you want a clean-looking sheet, but it is still a formula result rather than an actually empty cell. If you prefer an explicit outcome, replace the last argument with text such as "No review needed". That makes the false case visible and can help when checking whether a formula is working.
Using three or more alternatives
OR is not limited to two tests. Add another condition as another argument, separating it with a comma. This is helpful when several values should lead to the same decision. For example, a region column may contain North, South, East, or West, and you may want to label two of those regions as Regional.
Assuming the region is in C2, use:
=IF(OR(C2="North",C2="West"),"Regional","Other")
If C2 contains West, the result is Regional; if it contains South, the result is Other. For a longer list of alternatives, the formula remains valid but can become harder to scan. Put each test on its own line while editing the formula, or use a lookup table or another approach if the list changes frequently. The key logic stays the same: just one matching condition is enough for OR to return TRUE.
Combining OR with AND
Sometimes a rule has both “either/or” and “all of these” requirements. Put AND inside OR, or OR inside AND, according to the rule. In this example, a row should be prioritized if it is urgent, or if it is both paid and has an amount of at least 50. The amount is in B2, payment status in C2, and priority label in D2.
With those fields in row 2, enter:
=IF(OR(AND(B2>=50,C2="Paid"),D2="Urgent"),"Prioritize","Normal")
When B2 is 80, C2 is Paid, and D2 is blank, the result is Prioritize: both tests inside AND are true, so that grouped condition is true. When D2 is Urgent, the result is Prioritize even if the payment and amount tests do not both pass. If neither the urgent test nor the combined paid-and-amount test is true, the result is Normal.
Parentheses communicate which conditions belong together. Read the formula as “if (the amount is at least 50 and the status is Paid) or the priority is Urgent.” A useful way to avoid logic mistakes is to write the rule in ordinary language first, then group the conditions that must all be true with AND.
Use IF with OR in conditional formatting
If your goal is to color or highlight rows rather than return words in a helper column, you may not need IF at all. Google Sheets conditional formatting can use a custom formula that directly returns TRUE or FALSE. In the browser, select the range to format, then choose Format > Conditional formatting. Under “Format cells if,” choose “Custom formula is,” enter the formula, and select the desired formatting style.
For example, with task status in column B and amount in column C, select the range A2:D100 and use this custom formula:
=OR($B2="Overdue",$C2<0)
The dollar signs lock the column references so the rule checks B and C for every row, while the row number remains relative. The rule highlights a row if its status is Overdue or its amount is below zero. Check that the formula’s row number matches the first row of the selected range; if the range starts at row 2, use row 2 in the formula. Conditional formatting changes appearance, not the stored value.
Common mistakes and how to fix them
A formula can look plausible but behave unexpectedly when a comparison, reference, or output is not what the rule requires. These checks resolve many common issues:
- Every OR test is false: IF returns the false-case value. Check each comparison separately, including spelling, spaces, and which cells the references point to.
- Text is not quoted: Write text criteria as
A2="Open". Without quotation marks, Sheets may interpret a word as a named range or otherwise fail to parse the formula. - Numbers are stored as text: A value that looks like 100 may be text, especially after importing data. Check the cell’s contents and formatting, and convert the source data if numeric comparisons do not work as expected.
- Blank cells trigger the rule: A condition such as
A2=""is true when A2 is blank. If blanks should not count, add an explicit nonblank test using AND or adjust the condition to match the intended rule. - Arguments are separated incorrectly: Most Sheets locales use commas, but some use semicolons. If Sheets reports a formula parse error, check the spreadsheet locale under File > Settings and use the separator expected by that locale.
- Wrong outcome in a combined rule: Recheck the parentheses. Moving an AND condition inside or outside an OR changes the meaning, even when all the same tests appear in the formula.
It can help to test the logical expression alone in an unused cell first. For the earlier task example, =OR(A2="Open",B2>=100) should show TRUE or FALSE. Once that result matches the rule, add IF around it to return the labels you want.
When to use a different formula
Use IF with OR when several separate conditions should produce one shared outcome. If the desired outcome is simply TRUE or FALSE, OR alone is enough. If every condition must be satisfied, use AND instead. For instance, “paid and at least 50” is an AND rule, while “paid or at least 50” is an OR rule; those statements are not interchangeable.
For several different outcomes based on one value, nested IF formulas or IFS may be easier to follow than a long series of OR tests. For example, a grade formula needs different results for different score bands, not one result for any of several equivalent triggers. If the qualifying values are maintained in a separate list, a lookup-style design can be easier to update than editing a long formula. The right choice depends on whether the rule is a set of equivalent triggers, a set of combined requirements, or a decision with several distinct outcomes.
Frequently Asked Questions
Can Google Sheets IF check whether either condition is true?
Yes. Put the conditions inside OR in the IF test, as in =IF(OR(A2="Yes",B2="Yes"),"Proceed","Stop"). The true result appears when either condition is true, including when both are true.
Does OR mean both conditions must be true?
No. OR returns TRUE when at least one supplied condition is true. Use AND when every condition must be true.
Can I use more than two conditions in OR?
Yes. Add additional logical tests as arguments inside OR, separated by the argument separator used by your spreadsheet locale. Any one true test makes OR return TRUE.
Can IF with OR return a blank?
Yes. Use an empty string for the false result, or for the true result if that is what your rule needs. For example, =IF(OR(A2="Late",B2="Urgent"),"Check","") displays Check when a condition is met and otherwise displays nothing visibly.
Is the formula different in Excel?
The basic IF and OR formula syntax shown here also works in Excel, with commas in standard English-language settings. Argument separators can depend on regional settings in either program. The conditional-formatting menu path in this article is specific to Google Sheets; Excel uses its own conditional-formatting controls.
Related
- Wrap Text in Excel: Keep Long Cell Entries Visible
- How to Keep Track of Expenses in Excel
- How to Keep Track of Tasks at Work in Excel
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Double Space Sentences in Microsoft Word EasilyTo put two spaces between sentences in Microsoft Word, press Ctrl+H on Windows, replace each sentence-ending punctuation mark…
- Finance Spreadsheet in Google Sheets: Setup and FormulasA finance spreadsheet in Google Sheets can help you track income, spending, budgets, savings, and debt in one…
- MS Word Watermark: How to Add, Edit, and Remove OneTo add a watermark in Microsoft Word for Microsoft 365 on Windows, open Design > Watermark and choose…
- How to Archive and Save Emails in Outlook SecurelyTo archive an email in Outlook, select it and choose Archive; Outlook moves it to the Archive folder…
- Find Duplicates in Excel: A Practical Step-by-Step GuideTo find duplicate values in Excel, select the cells you want to check, then choose Home > Conditional…
- Add a Watermark to All Pages in WordYes. In Word for Microsoft 365 on Windows, select Design > Watermark and choose a preset, or open…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.