How IF with OR works
Syntax
=IF(OR(test1, test2, ...), value_if_true, value_if_false)OR(test1, test2, ...)- TRUE if at least one test is TRUE.
value_if_true- What to show when any test passes.
value_if_false- What to show when every test fails.
Example
A task is flagged when its status in B2 is "Blocked" or its due date in C2 has passed.
=IF(OR(B2="Blocked", C2<TODAY()), "Flag", "")Shows "Flag" when either is true, and leaves the cell empty otherwise.
Common mistakes
- Writing =IF(B2="Blocked" OR C2<TODAY(), ...). Spreadsheets have no OR operator; use the OR() function.
- Checking one cell against several values the long way. OR(B2="A", B2="B") works; so does OR(B2={"A","B"}) in Excel.
- Using OR when all conditions must be met. That is AND.
Questions people ask
How do I check if a cell equals one of several values?
List them in OR: =IF(OR(A2="Mon",A2="Tue"),"Early week","Later"), or use COUNTIF against a list.
Does OR work in Google Sheets?
Yes, OR and AND work the same in Google Sheets and Excel.
Practice it above: type the formula in the formula bar and press Enter to check.