Функтсияҳои мантиқӣ

This category contains the Logical functions.

Handling non-logical arguments in logical functions

Барои ин фармонро дастрас кардан...

Insert - Function - Category Logical


ISNA

ҲАҚҚОНӢ-ро бармегардонад агар чашмак #N/A дошта бошад.

If an error occurs, the function returns FALSE.

Синтаксис

ISNA(Value)

Value арзиши санҷидашаванда.

Намуна

ISNA(D3) ҚАЛБАКӢ-ро бармегардонад.

IFERROR

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

tip

This function is available since LibreOffice 4.0.


Синтаксис

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.

Намуна

=IFERROR(C8;C9) where cell C8 contains =1/0 returns the value of C9, because 1/0 is an error.

=IFERROR(C8;C9) where cell C8 contains 13 returns 13, the value of C8, which is not an error.

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.

XOR

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

Аргументҳо худашон ифодаи мантиқианд (TRUE, 1<5, 2+3=7, B8<10) ки арзиши мантиқӣ медиҳанд ё массив (A1:C3) ки арзиши мантиқӣ дорад.

tip

This function is available since LibreOffice 4.0.


Синтаксис

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.

Намуна

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

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

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

Ё

ҲАҚҚОНӢро бармегардонад агар ақалан як арзиш ҲАҚҚОНӢ бошад.

Аргументҳо худашон ифодаи мантиқианд (TRUE, 1<5, 2+3=7, B8<10) ки арзиши мантиқӣ медиҳанд ё массив (A1:C3) ки арзиши мантиқӣ дорад.

Синтаксис

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.


Намуна

Арзиши мантиқии 12<11; 13>22, ва 45=45 санвида мешаванд.

OR(12<11; 13>22; 45=45) натиҷа ҲАҚҚОНӢ.

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

note

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


АГАР

Санҷиши мантиқӣ мегузаронад.

Синтаксис

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

Testарзиш ё ифода, ки ҲАҚҚОНӢ ё ҚАЛБАКӢ мебошад.

Then_value (optional) арзишест, ки ҳангоми ҲАҚҚОНӢ будани натиҷа баргардонида мешавад.

Otherwise_value (ихтиёрӣ) арзишест, ки ҳангоми ҚАЛБАКӢ будани натиҷа баргардонида мешавад.

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

ВА

ҲАҚҚОНӢро бармегардонад, агар ҳама аргументҳо ҲАҚҚОНӢ бошанд.

Аргументҳо худашон ифодаи мантиқианд (TRUE, 1<5, 2+3=7, B8<10) ки арзиши мантиқӣ медиҳанд ё массив (A1:C3) ки арзиши мантиқӣ дорад.

Синтаксис

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.


Намуна

Арзишҳои мантиқии 12<13; 14>12 ва 7<6 санҷида мешаванд:

AND(12<13; 14>12; 7<6) натиҷа ҚАЛБАКӢ.

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

note

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


НЕ

Арзиши мантиқиро баръакс мегардонад.

Синтаксис

NOT(LogicalValue)

Logical Value арзиши баргардонидашаванда.

Намуна

NOT(A). A=ҲАҚҚОНӢ ба A=ҚАЛБАКӢ баргардонида мешавад.

ҚАЛБАКӢ

Натиҷа ҚАЛБАКӢ бармегардонад. Функтсияи FALSE() аргумент қабул намекунад ва доим ҚАЛБАКӢ аст.

Синтаксис

FALSE()

Намуна

FALSE() натиҷа FALSE

NOT(FALSE()) натиҷа TRUE

ҲАҚҚОНӢ

Арзиши мантиқӣ ба ҲАҚҚОНӢ табдил мешавад. Функтсияи TRUE() ягон аргумент намегирад.

Синтаксис

TRUE()

Намуна

Агар A=ҲАҚҚОНӢ ва B=ҚАЛБАКӢ бошад, онгоҳ:

=AND(A;B) натиҷа ҚАЛБАКӢ.

=OR(A;B) натиҷа ҲАҚҚОНӢ.

=NOT(AND(A;B)) натиҷа ҲАҚҚОНӢ.

Please support us!