如果任何一個提供的引數在邏輯上是 true,則傳回 true。如果所有引數在邏輯上是 false,則傳回 false。
使用範本
OR(A2 = "foo", A3 = "bar")
OR(TRUE,FALSE,TRUE)
OR(A1:A10,B1:B10)
OR(0,1,2,3)
語法
OR(邏輯運算式_1, [邏輯運算式_2, ...])
邏輯運算式_1
- An expression or reference to a cell containing an expression that represents some logical value, 亦即,TRUE
orFALSE
, or an expression that can be coerced to a 邏輯值邏輯運算式_2
- [ OPTIONAL ] - Additional expressions or references to cells containing expressions representing some logical values, i.e.TRUE
orFALSE
, or expressions that can be coerced to logical values.
附註
- The number 0 is logically false; all other numbers (including negative numbers) are logically true.
另請參閱
NOT
: 傳回邏輯值的相反值:如果是「NOT(TRUE)」則傳回「FALSE」;如果是「NOT(FALSE)」則傳回「TRUE」。
AND
: 如果所有提供的引數在邏輯上都是 true,則傳回 true。如果任何一個引數在邏輯上是 false,則傳回 false。
範例
傳回
TRUE
if at least one argument is TRUE
, accepts both 邏輯值
and range parameter.