LibreOffice 25.2 ヘルプ
This category contains the Logical functions.
Zero (0) is equivalent to FALSE and all other numbers are equivalent to TRUE.
Empty cells and text in cells are ignored.
A #VALUE error is raised if all arguments are ignored.
A #VALUE error is raised if one argument is direct text (not text in a cell).
Errors as argument lead to an error.
すべての引数が TRUE であれば TRUE を返します。要素のどれかが FALSE であれば、この関数は FALSE 値を返します。
引数は、論理値を返す論理式そのもの (TRUE、1<5、2+3=7、B8<10) であるか、論理値を含む行列の範囲 (A1:C3) です。
AND(Logical 1 [; Logical 2 [; … [; Logical 255]]])
入力 12<13、14>12、7<6 の論理値がチェックされます:
=AND(12<13;14>12;7<6) は、FALSE を返します。
=AND(FALSE();TRUE()) returns FALSE.
The array formula {=AND(B1:B10;C1:C10)} yields a one-dimensional value of TRUE when all components of B1:B10 and C1:C10 are TRUE. The array expression above does not produce the logical AND per element, and thus does not produce an array of logical values. To compute a logical AND of arrays per element use the * operator in array context. In the example, enter {=B1:B10*C1:C10}.
論理値 FALSE を返します。FALSE() 関数には引数は不要であり、常に論理値 FALSE を返します。
FALSE()
=FALSE() は、FALSE を返します。
=NOT(FALSE()) は、TRUE を返します
実行する論理テストを指定します。
IF(Test [; [ThenValue] [; [OtherwiseValue]]])
Test は、TRUE か FALSE のどちらかになる値または式です。
真の時の値 (オプション) は、論理テストが TRUE の場合に返される値です。
偽の時の値 (オプション) は、論理テストが FALSE の場合に返される値です。
LibreOffice Calc の関数のうち、パラメーターが"optional"とマークされたものは省略することができます。例えば、関数に4つのパラメーターがあった場合、最後の2個のパラメーターに"optional"が設定されていれば、4個目のパラメーターもしくは3個目と4個目のパラメーターを省略できます。ただし、3個目のパラメーターだけを省略することはできません。
=IF(A1>5;100;"too small") If the value in A1 is greater than 5, the value 100 is returned; otherwise, the text too small is returned.
=IF(A1>5;;"too small") If the value in A1 is greater than 5, the value 0 is returned because empty parameters are considered to be 0; otherwise, the text too small is returned.
=IF(A1>5;100;) If the value in A1 is less than 5, the value 0 is returned because the empty OtherwiseValue is interpreted as 0; otherwise 100 is returned.
論理値の補数 (反転) 演算をします。
NOT(論理値)
論理値 は補数演算される任意の値です。
=NOT(A)。もし A=TRUE なら、NOT(A) は FALSE を評価します。
1 つ以上の引数が TRUE であれば TRUE を返します。この関数は、すべての引数の論理値が FALSE であれば FALSE を返します。
引数は、論理値を返す論理式そのもの (TRUE、1<5、2+3=7、B8<10) であるか、論理値を含む行列の範囲 (A1:C3) です。
OR(Logical 1 [; Logical 2 [; … [; Logical 255]]])
入力 12<11、13>22、45=45 の論理値がチェックされます。
=OR(12<11;13>22;45=45) は、TRUE を返します。
=OR(FALSE();TRUE()) returns TRUE.
The array formula {=OR(B1:B10;C1:C10)} yields a one-dimensional value of FALSE when all components of B1:B10 and C1:C10 are FALSE. The array expression above does not produce the logical OR per element, and thus does not produce an array of logical values. To compute a logical OR of arrays per element use the + operator in array context. In the example, enter {=B1:B10+C1:C10}.
論理値は TRUE に設定されます。TRUE() 関数には引数は不要であり、常に論理値 TRUE を返します。
TRUE()
A=TRUE および B=FALSE であれば、次の例が表示されます。
=AND(A;B) は、FALSE を返します。
=OR(A;B) は、TRUE を返します。
=NOT(AND(A;B)) は、TRUE を返します。
TRUEになる引数が奇数個である場合、trueを返します。
引数は、論理値を返す論理式そのもの (TRUE、1<5、2+3=7、B8<10) であるか、論理値を含む行列の範囲 (A1:C3) です。
XOR(Logical 1 [; Logical 2 [; … [; Logical 255]]])
=XOR(TRUE();TRUE()) returns FALSE
=XOR(TRUE();TRUE();TRUE()) returns TRUE
=XOR(FALSE();TRUE()) returns TRUE