Funcións lóxicas

This category contains the Logical functions.

Handling non-logical arguments in logical functions

Para acceder a esta orde...

Inserir - Función - Categoría Lóxicas


ÉNONDISP

Devolve VERDADEIRO se unha cela contén o valor de erro #N/D (valor non dispoñíbel).

Se ocorrer un erro, a función devolve FALSE.

Sintaxe

Isna (valor)

Valor é o valor ou expresión sendo probada.

Exemplo

= Isna (D3) dá FALSE como un resultado.

ÉERRO

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

tip

Esta función está dispoñíbel desde a versión 4.0 do LibreOffice.


Sintaxe

SEÉERRO(Valor; Valor_alternativo)

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.

Exemplo

= ÉERRO (C8) en C8 célula contén = 1/0 dá VERDADEIRO, porque é un 1/0 erro.

= ÉERRO (C8) en C8 célula contén = 1/0 dá VERDADEIRO, porque é un 1/0 erro.

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.

E

Devolve VERDADEIRO se todos os argumentos sexan VERDADEIRO. Un dos elementos é FALSE, esta función devolve o valor FALSE.

Os argumentos son elas propias expresións lóxicas (VERDADEIRO, 1 <5, 2 + 3 = 7, B8 <10) que dáores lóxicos, ou matrices (A1: C3) contén valores lóxicos.

Sintaxe

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


Exemplo

Os valores lóxicos de entrada 12 <13; 14> 12, e 7 <6 a seren verificados:

= E (12 <13; 14> 12; 7 <6) dá FALSE.

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

FALSO

Devolve o valor lóxico FALSO. A función FALSE () non require argumentos e sempre devolve o valor lóxico FALSO.

Sintaxe

FALSE()

Exemplo

=FALSE() devolve FALSE

= NOT(falso()) devolve Verdadeiro

NON

Complementos (inverte) un valor lóxico.

Sintaxe

NON (Valorlóxico)

Valorlóxico é calquera valor a ser complementado.

Exemplo

= NOT (A) . Se A = VERDADEIRO entón NOT (A) pode avaliar FALSE.

OU

Devolve VERDADEIRO se polo menos un argumento sexa VERDADEIRO. Esta función devolve o valor FALSE, se todos os argumentos teñen o valor lóxico FALSO.

Os argumentos son elas propias expresións lóxicas (VERDADEIRO, 1 <5, 2 + 3 = 7, B8 <10) que dán valores lóxicos, ou matrices (A1: C3) contén valores lóxicos.

Sintaxe

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


Exemplo

Os valores lóxicos de entrada 12 <11; 13> 22, e 45 = 45 están a ser verificado.

= OU (12 <11; 13> 22; 45 = 45) dá VERDADEIRO.

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

SE

Especifica unha proba lóxica para ser executada.

Sintaxe

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

Test é calquera valor ou expresión que pode ser VERDADEIRO ou FALSO.

DaquelaValor (opcional) é o valor que é devolto se a proba lóxica sexa VERDADEIRO.

SenónValor (opcional) é o valor que é devolto se a proba lóxica sexa FALSO.

Nas funcións de LibreOffice Calc, os parámetros marcados como «opcional» só poden omitirse cando non haxa ningún outro parámetro a seguir. Por exemplo, nunha función de catro parámetros, dos cales só os dous últimos aparecen marcados como «opcional», pódese omitir o parámetro 4 ou os parámetros 3 e 4, mais non é posíbel omitir exclusivamente o parámetro 3.

Exemplo

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

VERDADEIRO

O valor lóxico defínese como VERDADEIRO. A función VERDADEIRO () non require argumentos e sempre devolve o valor lóxico VERDADEIRO.

Sintaxe

VERDADEIRO()

Exemplo

Se A = B = VERDADEIRO e FALSE exemplos a seguir aparecen:

=E(A;B) devolve FALSO

=OU(A;B) devolve VERDADEIRO

= NOT(E(A;B)) devolve Verdadeiro

XOR

Devolve VERDADEIRO se un número impar de argumentos valorada como VERDADEIRO.

Os argumentos son elas propias expresións lóxicas (VERDADEIRO, 1 <5, 2 + 3 = 7, B8 <10) que retornan valores lóxicos, ou matrices (A1: C3) contén valores lóxicos.

tip

Esta función está dispoñíbel desde a versión 4.0 do LibreOffice.


Sintaxe

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.

Exemplo

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

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

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

Precisamos da súa axuda!