Difference between revisions of "Documentation/How Tos/Calc: OR function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(See also:)
m (Robot: Automated text replacement %s)
Line 24: Line 24:
 
: returns <tt>'''TRUE'''</tt>, because cell C2 is <tt>'''TRUE'''</tt>.
 
: returns <tt>'''TRUE'''</tt>, because cell C2 is <tt>'''TRUE'''</tt>.
  
=== See also: ===
+
{{Documentation/SeeAlso|
'''[[Documentation/How_Tos/Calc: AND function|AND]]''',
+
* [[Documentation/How_Tos/Calc: AND function|AND]]
'''[[Documentation/How_Tos/Calc: NOT function|NOT]]'''
+
* [[Documentation/How_Tos/Calc: NOT function|NOT]]'''
  
'''[[Documentation/How_Tos/Calc: Logical functions|Logical functions]]'''
+
* [[Documentation/How_Tos/Calc: Logical functions|Logical functions]]'''
  
[[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']],
+
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
+
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
  
 
=== Issues: ===
 
=== Issues: ===
 
* Entering <tt>'''=OR(TRUE; FALSE)'''</tt> in a cell correctly returns <tt>'''TRUE'''</tt>, but the display in the formula bar is <tt>'''=OR(1; 0)'''</tt>. See [http://www.openoffice.org/issues/show_bug.cgi?id=84266 Issue 84266].
 
* Entering <tt>'''=OR(TRUE; FALSE)'''</tt> in a cell correctly returns <tt>'''TRUE'''</tt>, but the display in the formula bar is <tt>'''=OR(1; 0)'''</tt>. See [http://www.openoffice.org/issues/show_bug.cgi?id=84266 Issue 84266].

Revision as of 14:10, 25 February 2009


OR

Returns TRUE if any of the arguments are considered TRUE, and FALSE otherwise.

Syntax:

OR(argument1; argument2 ...argument30)

argument1 to argument30 are up to 30 arguments, each of which may be a logical result or value, or a reference to a cell or range.


OR tests every value (as an argument, or in a each referenced cell), and returns TRUE if any of them are TRUE. Any non-zero number is considered to be TRUE. Any text cells in ranges are ignored.

Example:

OR(TRUE; FALSE)

returns TRUE.

OR(0; 5)

returns TRUE, because 5 is considered TRUE.

If cells A5:B8 all contain FALSE, and cell C2 contains =TRUE():

OR(1>2; A5:B8; C2)

returns TRUE, because cell C2 is TRUE.

Template:Documentation/SeeAlso

Issues:

  • Entering =OR(TRUE; FALSE) in a cell correctly returns TRUE, but the display in the formula bar is =OR(1; 0). See Issue 84266.
Personal tools