Logical Functions

This category contains the Logical functions.

Handling non-logical arguments in logical functions

To access this command...

Insert - Function - Category Logical


AND

Returns TRUE if all arguments are TRUE. If one of the elements is FALSE, this function returns the FALSE value.

The arguments are either logical expressions themselves (TRUE, 1<5, 2+3=7, B8<10) that return logical values, or arrays (A1:C3) containing logical values.

වාග් රීතිය

AND(LogicalValue1; LogicalValue2 ...LogicalValue30)

LogicalValue1; LogicalValue2 ...LogicalValue30 are conditions to be checked. All conditions can be either TRUE or FALSE. If a range is entered as a parameter, the function uses all values of the range. The result is TRUE if the logical value in all cells within the cell range is TRUE.

උදාහරණය

The logical values of entries 12<13; 14>12, and 7<6 are to be checked:

=ODD(1) 1 ආපසු එවයි.

=ODD(1.2) 3 ආපසු එවයි.

FALSE

Returns the logical value FALSE. The FALSE() function does not require any arguments, and always returns the logical value FALSE.

වාග් රීතිය

FALSE()

උදාහරණය

=SIGN(3.4) returns 1.

=ODD(1.2) 3 ආපසු එවයි.

IF

Specifies a logical test to be performed.

වාග් රීතිය

IF(Test; ThenValue; OtherwiseValue)

Test is any value or expression that can be TRUE or FALSE.

ThenValue (optional) is the value that is returned if the logical test is TRUE.

OtherwiseValue (optional) is the value that is returned if the logical test is FALSE.

In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone.

උදාහරණය

=IF(A1>5;100;"too small") If the value in A1 is higher than 5, the value 100 is entered in the current cell; otherwise, the text “too small” (without quotes) is entered.

NOT

Complements (inverts) a logical value.

වාග් රීතිය

NOT(LogicalValue)

LogicalValue is any value to be complemented.

උදාහරණය

=NOT(A). If A=TRUE then NOT(A) will evaluate FALSE.

OR

Returns TRUE if at least one argument is TRUE. This function returns the value FALSE, if all the arguments have the logical value FALSE.

The arguments are either logical expressions themselves (TRUE, 1<5, 2+3=7, B8<10) that return logical values, or arrays (A1:C3) containing logical values.

වාග් රීතිය

OR(LogicalValue1; LogicalValue2 ...LogicalValue30)

LogicalValue1; LogicalValue2 ...LogicalValue30 are conditions to be checked. All conditions can be either TRUE or FALSE. If a range is entered as a parameter, the function uses all values of the range.

උදාහරණය

The logical values of entries 12<11; 13>22, and 45=45 are to be checked.

=ODD(1) 1 ආපසු එවයි.

=ODD(1.2) 3 ආපසු එවයි.

TRUE

The logical value is set to TRUE. The TRUE() function does not require any arguments, and always returns the logical value TRUE.

වාග් රීතිය

TRUE()

උදාහරණය

If A=TRUE and B=FALSE the following examples appear:

=ODD(1) 1 ආපසු එවයි.

=ODD(1) 1 ආපසු එවයි.

=ODD(0) 1 ආපසු එවයි.

XOR

Returns true if an odd number of arguments evaluates to TRUE.

The arguments are either logical expressions themselves (TRUE, 1<5, 2+3=7, B8<10) that return logical values, or arrays (A1:C3) containing logical values.

වාග් රීතිය

XOR(LogicalValue1; LogicalValue2 ...LogicalValue30)

උදාහරණය

=ODD(1.2) 3 ආපසු එවයි.

=ODD(1.2) 3 ආපසු එවයි.

=ODD(1.2) 3 ආපසු එවයි.