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

From Apache OpenOffice Wiki
Jump to: navigation, search
m
 
Line 1: Line 1:
{{Documentation/MasterTOC
+
{{DISPLAYTITLE:OR function}}
|bookid=1234'''
+
{{Documentation/CalcFunc LogicalTOC
|booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div>
+
|ShowPrevNext=block
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Logical_functions|<div style="font-size: 140%;">Logical  Functions]]
+
|PrevPage=Documentation/How_Tos/Calc:_NOT_function
|ShowNextPage=block|NextPage=Documentation/How_Tos/Calc:_TRUE_function
+
|NextPage=Documentation/How_Tos/Calc:_TRUE_function
|ShowPrevPage=block|PrevPage=Documentation/How_Tos/Calc:_NOT_function
+
}}__NOTOC__
|ShowPrevPart=block|PrevPart=Documentation/How_Tos/Calc:_Information_functions
+
|ShowNextPart=block|NextPart=Documentation/How_Tos/Calc:_Mathematical_functions
+
|toccontent= <div style="padding: 4px; font-size: 130%; font-weight: hidden; background-color:#DCE9FC;">FUNCTIONS</div>
+
 
+
* [[Documentation/How_Tos/Calc:_AND_function|<div style="font-size: 120%;">And]]
+
* [[Documentation/How_Tos/Calc:_FALSE_function|<div style="font-size: 120%;">False]]
+
* [[Documentation/How_Tos/Calc:_IF_function|<div style="font-size: 120%;">If]]
+
* [[Documentation/How_Tos/Calc:_NOT_function|<div style="font-size: 120%;">Not]]
+
* [[Documentation/How_Tos/Calc:_OR_function|<div style="font-size: 120%; border-style: double; border-color:#778899;">Or]]
+
* [[Documentation/How_Tos/Calc:_TRUE_function|<div style="font-size: 120%;">True]]
+
}}__TOC__
+
  
 
== OR  ==
 
== OR  ==
Line 26: Line 15:
  
  
<tt>'''OR'''</tt> tests every value (as an argument, or in a each referenced cell), and returns <tt>'''TRUE'''</tt> if any of them are <tt>'''TRUE'''</tt>. Any '''non-zero number''' is considered to be <tt>'''TRUE'''</tt>. Any '''text''' cells in ranges are ignored.  
+
<tt>'''OR'''</tt> tests every value (as an argument, or in each referenced cell), and returns <tt>'''TRUE'''</tt> if any of them are <tt>'''TRUE'''</tt>. Any '''non-zero number''' is considered to be <tt>'''TRUE'''</tt>. Any '''text''' cells in ranges are ignored.  
  
 
=== Example: ===
 
=== Example: ===
Line 41: Line 30:
  
 
=== 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 {{bug|58572;84266}}.
  
 
{{SeeAlso|EN|
 
{{SeeAlso|EN|

Latest revision as of 13:46, 31 January 2024

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 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.

Issues:

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



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_OR_function&oldid=259830"
Views
Personal tools
Navigation
Tools
In other languages