Logical All versions ◉ 27 views

=OR()

Use the OR function, one of the logical functions, to determine if any conditions in a test are TRUE.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=OR(logical1, [logical2], ...)
Hover argument names in the table for details.
Output typeLogical
Popularity50 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =OR() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
Download OR.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
logical1 Logical Required The first condition that you want to test that can evaluate to either TRUE or FALSE.
logical2 Logical Optional Additional conditions that you want to test that can evaluate to either TRUE or FALSE, up to a maximum of 255 conditions.

▣ Examples

Displays TRUE if A2 is greater than 1 OR less than 100, otherwise it displays FALSE. =OR(A2>1,A2<100)
Displays the value in cell A3 if it is greater than 1 OR less than 100, otherwise it displays the message "The value is out of range". =IF(OR(A2>1,A2<100),A3,"The value is out of range")
Displays the value in cell A2 if it's less than 0 OR greater than 50, otherwise it displays a message. =IF(OR(A2<0,A2>50),A2,"The value is out of range")
Example 4 =IF(OR(B14>=$B$4,C14>=$B$5),B14*$B$6,0)

§ Remarks

  • The arguments must evaluate to logical values such as TRUE or FALSE, or in arrays or references that contain logical values.
  • If an array or reference argument contains text or empty cells, those values are ignored.
  • If the specified range contains no logical values, OR returns the #VALUE! error value.
  • You can use an OR array formula to see if a value occurs in an array. To enter an array formula, press CTRL+SHIFT+ENTER.

✦ Tips

  • The arguments must evaluate to logical values such as TRUE or FALSE, or in arrays or references that contain logical values.
  • If an array or reference argument contains text or empty cells, those values are ignored.
  • You can use an OR array formula to see if a value occurs in an array. To enter an array formula, press CTRL+SHIFT+ENTER.

⚠ Common Errors

#VALUE! If the specified range contains no logical values, OR returns the #VALUE! error value.
Fix: Write the condition as a comparison

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.