# Loogilised funktsioonid

This category contains the Logical functions.

### Handling non-logical arguments in 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.

Selle kĂ¤su kasutamiseks...

Insert - Function - Category Logical

### ISNA

Vea korral tagastab funktsioon vastuse VĂ„Ă„R.

#### SĂĽntaks

ISNA(vĂ¤Ă¤rtus)

VĂ¤Ă¤rtus on kontrollitav vĂ¤Ă¤rtus vĂµi avaldis.

#### NĂ¤ide

=ISNA(D3) tagastab vastuse VĂ„Ă„R.

### IFERROR

Tagastab standardiseeritud normaaljaotuse jaotusfunktsiooni vĂ¤Ă¤rtused.

See funktsioon on saadaval alates LibreOffice 4.0-st.

#### SĂĽntaks

IFERROR(Value; Alternate_value)

VĂ¤Ă¤rtus on kontrollitav vĂ¤Ă¤rtus vĂµi avaldis.

VĂ¤Ă¤rtus on kontrollitav vĂ¤Ă¤rtus vĂµi avaldis.

#### NĂ¤ide

=ISERROR(C8) tagastab TĂ•ENE, kui C8 sisaldab =1/0, sest 1/0 on vigane tehe.

=ISERROR(C8) tagastab TĂ•ENE, kui C8 sisaldab =1/0, sest 1/0 on vigane tehe.

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

Tagastab TĂ•ENE, kui kĂµikide argumentide vĂ¤Ă¤rtus on TĂ•ENE. Kui vĂ¤hemalt ĂĽks elementidest on VĂ„Ă„R, tagastab funktsioon vastuse VĂ„Ă„R.

Argumentideks on kas loogilised avaldised (TRUE, 1<5, 2+3=7, B8<10), mille vastuseks on tĂµevĂ¤Ă¤rtus, vĂµi tĂµevĂ¤Ă¤rtusi sisaldavad massiivid (A1:C3).

#### SĂĽntaks

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.

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.

#### NĂ¤ide

Kontrollitakse kirjete 12<13, 14>12 ja 7<6 tĂµevĂ¤Ă¤rtusi:

=AND(12<13;14>12;7<6) tagastab VĂ„Ă„R.

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

## FALSE

Tagastab tĂµevĂ¤Ă¤rtuse VĂ„Ă„R. Funktsioon FALSE() ei vaja argumente ja tagastab alati tĂµevĂ¤Ă¤rtuse VĂ„Ă„R.

FALSE()

#### NĂ¤ide

=FALSE() tagastab vĂ¤Ă¤rtuse VĂ„Ă„R

=NOT(FALSE()) tagastab vĂ¤Ă¤rtuse TĂ•ENE

## IF

MĂ¤Ă¤rab lĂ¤biviidava loogilise testi.

#### SĂĽntaks

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

Tingimus on mis tahes vĂ¤Ă¤rtus vĂµi avaldis, mis vĂµib olla TĂ•ENE vĂµi VĂ„Ă„R.

Siis_vĂ¤Ă¤rtus (pole kohustuslik) on vĂ¤Ă¤rtus, mis tagastatakse juhul, kui tĂµevĂ¤Ă¤rtuse test annab vĂ¤Ă¤rtuse TĂ•ENE.

Muidu_vĂ¤Ă¤rtus (pole kohustuslik) on vĂ¤Ă¤rtus, mis tagastatakse juhul, kui tĂµevĂ¤Ă¤rtuse test annab vĂ¤Ă¤rtuse VĂ„Ă„R.

LibreOffice Calci funktsioonides vĂµib argumendi, mis on mĂ¤rgitud kui "mittekohustuslik", jĂ¤tta Ă¤ra ainult siis, kui talle ei jĂ¤rgne enam teisi argumente. NĂ¤iteks, kui nelja argumendiga funktsiooni kaks viimast argumenti omavad mĂ¤rget "mittekohustuslik", vĂµib Ă¤ra jĂ¤tta argumendi 4 vĂµi argumendid 3 ja 4, kuid mitte argumenti 3 ĂĽksinda.

#### NĂ¤ide

=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

PĂ¶Ă¶rab tĂµevĂ¤Ă¤rtuse vastupidiseks.

#### SĂĽntaks

NOT(tĂµevĂ¤Ă¤rtus)

TĂµevĂ¤Ă¤rtus on vĂ¤Ă¤rtus, mis tuleb vastupidiseks pĂ¶Ă¶rata.

#### NĂ¤ide

=NOT(A). Kui A=TĂ•ENE, siis NOT(A) annab vĂ¤Ă¤rtuseks VĂ„Ă„R.

## OR

Tagastab TĂ•ENE, kui vĂ¤hemalt ĂĽks argument on TĂ•ENE. Funktsioon tagastab vĂ¤Ă¤rtuse VĂ„Ă„R, kui kĂµikide argumentide vĂ¤Ă¤rtuseks on VĂ„Ă„R.

Argumentideks on kas loogilised avaldised (TRUE, 1<5, 2+3=7, B8<10), mille vastuseks on tĂµevĂ¤Ă¤rtus, vĂµi tĂµevĂ¤Ă¤rtusi sisaldavad massiivid (A1:C3).

#### SĂĽntaks

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.

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.

#### NĂ¤ide

Kontrollitakse kirjete 12<11, 13>22 ja 45=45 tĂµevĂ¤Ă¤rtusi.

=OR(12<11;13>22;45=45) tagastab vĂ¤Ă¤rtuse TĂ•ENE.

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

## TRUE

Tagastab tĂµevĂ¤Ă¤rtuse TĂ•ENE. Funktsioon TRUE() ei vaja argumente ja tagastab alati tĂµevĂ¤Ă¤rtuse TĂ•ENE.

TRUE()

#### NĂ¤ide

Kui A=TĂ•ENE ja B=VĂ„Ă„R, siis jĂ¤rgnevates nĂ¤idetes:

=AND(A;B) tagastab vĂ¤Ă¤rtuse VĂ„Ă„R

=OR(A;B) tagastab vĂ¤Ă¤rtuse TĂ•ENE

=NOT(AND(A;B)) tagastab vĂ¤Ă¤rtuse TĂ•ENE

## XOR

Tagastab TĂ•ENE, kui paaritu arv argumente on TĂ•ESED.

Argumentideks on kas loogilised avaldised (TĂ•ENE, 1<5, 2+3=7, B8<10), mille vastuseks on tĂµevĂ¤Ă¤rtus, vĂµi tĂµevĂ¤Ă¤rtusi sisaldavad massiivid (A1:C3).

See funktsioon on saadaval alates LibreOffice 4.0-st.

#### SĂĽntaks

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.

#### NĂ¤ide

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

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

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

Palun toeta meid!