論理関数

このカテゴリーには、論理関数があります。

Handling non-logical arguments in logical functions

このコマンドの見つけ方

挿入 - 関数 - カテゴリー 論理


ISNA

この関数は、セルにエラー値 #N/A (使用できない値) が含まれている場合に TRUE を返します。

エラーが発生した場合、この関数は FALSE を返します。

Syntax

ISNA(値)

は、検査する値または式です。

Example

=ISNA(D3) は、結果として FALSE を返します。

IFERROR

Returns the value if the cell does not contain an error value, or the alternative value if it does.

tip

この関数はLibreOffice 4.0以降で利用できます。


Syntax

IFERROR(Value; Alternate_value)

Value is the value or expression to be returned if it is not equal or results in an error.

Alternate_value is the value or expression to be returned if the expression or value of Value is equal or results in an error.

Example

1/0 はエラーなので、セル C8 に =1/0 が含まれる =ISERROR(C8) は、TRUE を返します。

1/0 はエラーなので、セル C8 に =1/0 が含まれる =ISERROR(C8) は、TRUE を返します。

IFS

IFS is a multiple IF-function.

SWITCH

SWITCH compares expression with value1 to valuen and returns the result belonging to the first value that equals expression. If there is no match and default_result is given, that will be returned.

AND

すべての引数が TRUE であれば TRUE を返します。要素のどれかが FALSE であれば、この関数は FALSE 値を返します。

引数は、論理値を返す論理式そのもの (TRUE、1<5、2+3=7、B8<10) であるか、論理値を含む行列の範囲 (A1:C3) です。

Syntax

AND(Logical 1 [; Logical 2 [; … [; Logical 255]]])

Logical 1, Logical 2, … , Logical 255 are boolean values, references to cells or to cell ranges of logical values.

note

This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.


Example

入力 12<13、14>12、7<6 の論理値がチェックされます:

=AND(12<13;14>12;7<6) は、FALSE を返します。

=AND(FALSE();TRUE()) returns FALSE.

FALSE

論理値 FALSE を返します。FALSE() 関数には引数は不要であり、常に論理値 FALSE を返します。

Syntax

FALSE()

Example

=FALSE() は、FALSE を返します。

=NOT(FALSE()) は、TRUE を返します

IF

実行する論理テストを指定します。

Syntax

IF(Test [; [ThenValue] [; [OtherwiseValue]]])

Test は、TRUE か FALSE のどちらかになる値または式です。

真の時の値 (オプション) は、論理テストが TRUE の場合に返される値です。

偽の時の値 (オプション) は、論理テストが FALSE の場合に返される値です。

LibreOffice Calc の関数のうち、パラメーターが"optional"とマークされたものは省略することができます。例えば、関数に4つのパラメーターがあった場合、最後の2個のパラメーターに"optional"が設定されていれば、4個目のパラメーターもしくは3個目と4個目のパラメーターを省略できます。ただし、3個目のパラメーターだけを省略することはできません。

Example

=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

論理値の補数 (反転) 演算をします。

Syntax

NOT(論理値)

論理値 は補数演算される任意の値です。

Example

=NOT(A)。もし A=TRUE なら、NOT(A) は FALSE を評価します。

OR

1 つ以上の引数が TRUE であれば TRUE を返します。この関数は、すべての引数の論理値が FALSE であれば FALSE を返します。

引数は、論理値を返す論理式そのもの (TRUE、1<5、2+3=7、B8<10) であるか、論理値を含む行列の範囲 (A1:C3) です。

Syntax

OR(Logical 1 [; Logical 2 [; … [; Logical 255]]])

Logical 1, Logical 2, … , Logical 255 are boolean values, references to cells or to cell ranges of logical values.

note

This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.


Example

入力 12<11、13>22、45=45 の論理値がチェックされます。

=OR(12<11;13>22;45=45) は、TRUE を返します。

=OR(FALSE();TRUE()) returns TRUE.

TRUE

論理値は TRUE に設定されます。TRUE() 関数には引数は不要であり、常に論理値 TRUE を返します。

Syntax

TRUE()

Example

A=TRUE および B=FALSE であれば、次の例が表示されます。

=AND(A;B) は、FALSE を返します。

=OR(A;B) は、TRUE を返します。

=NOT(AND(A;B)) は、TRUE を返します。

XOR

TRUEになる引数が奇数個である場合、trueを返します。

引数は、論理値を返す論理式そのもの (TRUE、1<5、2+3=7、B8<10) であるか、論理値を含む行列の範囲 (A1:C3) です。

tip

この関数はLibreOffice 4.0以降で利用できます。


Syntax

XOR(Logical 1 [; Logical 2 [; … [; Logical 255]]])

Logical 1, Logical 2, … , Logical 255 are boolean values, references to cells or to cell ranges of logical values.

Example

=XOR(TRUE();TRUE()) returns FALSE

=XOR(TRUE();TRUE();TRUE()) returns TRUE

=XOR(FALSE();TRUE()) returns TRUE

ご支援をお願いします!