Check if a cell equals one of several values
=IF(OR(B2="CA",B2="OR",B2="WA"),"West","Central")Excel · result on the sample sheet: 7 rows (C2:C8)
Describe what you need and get a working OR formula for Excel and Google Sheets, tested on real data before you copy it. OR returns TRUE when at least one of its conditions is TRUE.
Each formula below was calculated on its own sample sheet. Open one to see the sheet, why it works, and to try it yourself.
=IF(OR(B2="CA",B2="OR",B2="WA"),"West","Central")Excel · result on the sample sheet: 7 rows (C2:C8)
=IF(OR(B2="",C2=""),"",C2-B2)Excel · result on the sample sheet: 6 rows (D2:D7)
=IF(OR(B2<$G$2,B2>$H$2),"Outlier","")Excel · result on the sample sheet: 10 rows (C2:C11)
=IF(AND(B2="Yes",OR(C2>=$H$1,D2="Local")),"Yes","No")Excel · result on the sample sheet: 6 rows (E2:E7)
=OR(LEFT(A2)=" ",RIGHT(A2)=" ")Excel · result on the sample sheet: 6 rows (B2:B7)
=IF(MOD(B2-$F$1,1)<MOD($F$2-$F$1,1),"Yes","No")Excel · result on the sample sheet: 6 rows (C2:C7)
=IF(NOT(OR(B2="Yes",C2>=$G$1)),"Reject","Review")Excel · result on the sample sheet: 5 rows (D2:D6)
=IF(SUMPRODUCT(--ISNUMBER(SEARCH($D$2:$D$4,A2)))>0,"Yes","No")Excel · result on the sample sheet: 7 rows (B2:B8)
You describe the task in plain English, and it writes the formula, using OR where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.
OR returns TRUE when at least one of its conditions is TRUE.
Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the OR function page has a practice exercise.