Tabelarvutuse funktsioonid

See sektsioon sisaldab tabelarvutuse funktsioonide kirjeldusi koos näidetega.

Selle käsu kasutamiseks...

Lisamine - Funktsioon - Kategooria Arvutustabel


[text/scalc/01/func_error_type.xhp#error_type_head not found].

Returns a number representing a specific Error type, or the error value #N/A, if there is no error.

STYLE

Applies a style to the cell containing the formula.

ADDRESS

Tagastab lahtri aadressi (viite) teksti kujul vastavalt ette antud rea ja veeru numbritele. Võimalik on määrata, kas aadress on absoluutaadress (näiteks $A$1), suhteline aadress (nagu A1) või kombinatsioon nendest (A$1 või $A1). Saab määrata ka lehe nime.

Koostalitlusvõime huvides toetavad funktsioonid ADDRESS ja INDIRECT mittekohustuslikku parameetrit, mille abil saab määrata, kas tavapärase A1-kuju asemel tuleks kasutada aadressikuju R1V1.

Funktsioonis ADDRESS lisatakse see parameeter neljanda parameetrina, mis nihutab mittekohustusliku lehenime parameetri viiendale positsioonile.

Funktsioonis INDIRECT lisatakse parameeter teise parameetrina.

Kui argument sisestatakse väärtusega 0, kasutatakse mõlema funktsiooni korral kujul R1V1. Kui argumenti ei ole antud või selle väärtus pole 0, kasutatakse kuju A1.

R1V1-tähistuse korral tagastab ADDRESS aadressistringid kasutades lehenimede eraldajana hüüumärki '!' ning funktsioon INDIRECT eeldab lehenimede eraldajana hüüumärki. A1-tähistuse korral kasutavad mõlemad funktsioonid lehenimede eraldajana punkti '.'.

When opening documents from ODF 1.0/1.1 format, the ADDRESS functions that show a sheet name as the fourth parameter will shift that sheet name to become the fifth parameter. A new fourth parameter with the value 1 will be inserted.

Kui dokument salvestatakse ODF 1.0/1.1 vormingus ja ADDRESS-funktsioonidel on neljas parameeter, siis see parameeter eemaldatakse.

note

Ära salvesta arvutustabelit vanas ODF 1.0/1.1 vormingus, kui funktsiooni ADDRESS uus neljas parameeter on kasutatud väärtusega 0.


note

Funktsioon INDIRECT salvestatakse ilma ODF 1.0/1.1 vormingusse teisendamata. Kui teine parameeter oli olemas, tagastab Calci vanem versioon selle funktsiooni korral veaväärtuse.


SĂĽntaks

ADDRESS(Row; Column [; Abs [; A1 [; "Sheet"]]])

Rida on lahtriviite reanumber.

Veerg on lahtriviite veerunumber (number, mitte täht).

Abs määrab viite tüübi:

1: absoluutne ($A$1)

2: rida absoluutne, veerg suhteline (A$1)

3: rida suhteline; veerg absoluutne ($A1)

4: suhteline (A1)

A1 (mittekohustuslik) - kui see väärtus on 0, kasutatakse R1V1-tähistust. Kui see parameeter puudub või selle väärtus pole 0, kasutatakse A1-tähistust.

Leht on lehe nimi. See peab olema kahekordsetes jutumärkides.

Näide:

=ADDRESS(1; 1; 2; "Leht2") tagastab: Leht2.A$1

If the formula above is in cell B2 of current sheet, and the cell A1 in sheet 2 contains the value -6, you can refer indirectly to the referenced cell using a function in B2 by entering =ABS(INDIRECT(B2)). The result is the absolute value of the cell reference specified in B2, which in this case is 6.

AREAS

Tagastab mitmesesse alasse kuuluvate üksikute vahemike arvu. Vahemik võib koosneda kõrvutiasuvatest lahtritest või üksikust lahtrist.

Funktsioon eeldab üksikut argumenti. Kui esitada mitu vahemikku, tuleb need panna lisasulgudesse. Mitme vahemiku sisestamisel võib eraldajana kasutada semikoolonit (;), kuid see teisendatakse automaatselt tildeks (~). Tildet kasutatakse vahemike ühendamiseks.

SĂĽntaks

AREAS(viide)

Viide tähistab viidet lahtrile või lahtrite vahemikule.

Näide

=AREAS((A1:B3;F2;G1)) tagastab 3, kuna see on viide kolmele lahtrile ja/või alale. Pärast sisestamist teisendatakse see kujule =AREAS((A1:B3~F2~G1)).

=AREAS(Kõik) tagastab väärtuse 1, kui oled aknas Andmed - Määra vahemik määranud ala nimega Kõik.

CHOOSE

Tagastab indeksi abil väärtuse kuni 30 väärtuse loendist.

SĂĽntaks

CHOOSE(Index; Value 1 [; Value 2 [; ... [; Value 30]]])

Indeks on viide või arv vahemikus 1 kuni 30, mis näitab, milline väärtus tuleb loendist võtta.

Value 1, Value 2, ..., Value 30 is the list of values entered as a reference to a cell or as individual values.

Näide

=CHOOSE(A1;B1;B2;B3;"Täna";"Eile";"Homme") näiteks tagastab lahtri B2 sisu, kui A1 = 2; kui A1 = 4, tagastab funktsioon teksti "Täna".

COLUMN

Returns the column number of a cell reference. If the reference is a cell the column number of the cell is returned; if the parameter is a cell area, the corresponding column numbers are returned in a single-row array if the formula is entered as an array formula. If the COLUMN function with an area reference parameter is not used for an array formula, only the column number of the first cell within the area is determined.

SĂĽntaks

COLUMN([viide])

Viide on viide lahtrile või lahtrivahemikule, mille esimese veeru numbrit otsitakse.

Kui viide puudub, tagastatakse veeru number, milles valem ise asub. LibreOffice Calc määrab viite aktiivsele lahtrile automaatselt.

Näide

=COLUMN(A1) võrdub 1. Veerg A on tabeli esimene veerg.

=COLUMN(C3:E3) võrdub 3. Veerg C on tabeli kolmas veerg.

=COLUMN(D3:G10) tagastab 4, kuna veerg D on tabelis neljas veerg ja funktsiooni COLUMN ei kasutata massiivi valemina. (Sel juhul kasutatakse tulemina alati massiivi esimest väärtust.)

{=COLUMN(B2:B7)} ja =COLUMN(B2:B7) tagastavad mõlemad 2, kuna viide sisaldab ainult veergu B, mis on tabeli teine veerg. Kuna üheveerulistel vahemikel on ainult üks veerunumber, pole vahet, kas valemit kasutatakse massiivi valemina või mitte.

=COLUMN() tagastab 3, kui valem sisestati veergu C.

{=COLUMN(Jänes)} tagastab üherealise massiivi (3, 4), kui "Jänes" on nimega vahemik (C1:D3).

COLUMNS

Tagastab viitega määratud ala veergude arvu.

SĂĽntaks

COLUMNS(massiiv)

Massiiv on viide lahtrivahemikule, mille veergude koguarvu soovitakse otsida. Argument võib olla ka üks lahter.

Näide

=COLUMNS(B5) tagastab 1, kuna lahter sisaldab ainult ĂĽhte veergu.

=COLUMNS(A1:C5) võrdub 3. Viide koosneb kolmest veerust.

=COLUMNS(Jänes) tagastab 2, kui Jänes on nimega vahemik (C1:D3).

DDE

Tagastab DDE-põhise lingi tulemuse. Kui lingitud vahemiku või sektsiooni sisu muutub, siis muutub ka tagastatud väärtus. Värskendatud linkide kuvamiseks tuleb arvutustabel uuesti laadida või valida Redigeerimine - Lingid. Platvormidevahelised lingid, näiteks Windowsiga arvutis töötavast LibreOffice'i paigaldusest Linuxiga arvutis loodud dokumendile, pole lubatud.

SĂĽntaks

DDE("Server"; "File"; "Range" [; Mode])

Server is the name of a server application. LibreOffice applications have the server name "soffice".

Fail on faili täielik nimi koos selle aadressiga.

Vahemik on ala, mis sisaldab andmeid, mida käsitletakse.

ReĹľiim on mittekohustuslik parameeter, mis juhib meetodit, mida DDE-server andmete arvudeks teisendamiseks kasutab.

Mode

Effect

0 või puudub

Lahtristiilile "Vaikimisi" vastav arvuvorming

1

Andmeid käsitletakse alati vastavalt USA inglise keele standardvormingule

2

Andmeid käsitletakse tekstina, neid arvudeks teisendamata


Näide

=DDE("soffice";"c:\office\document\data1.ods";"sheet1.A1") reads the contents of cell A1 in sheet1 of the LibreOffice Calc spreadsheet data1.ods.

=DDE("soffice";"c:\office\document\motto.odt";"Today's motto") returns a motto in the cell containing this formula. First, you must enter a line in the motto.odt document containing the motto text and define it as the first line of a section named Today's Motto (in LibreOffice Writer under Insert - Section). If the motto is modified (and saved) in the LibreOffice Writer document, the motto is updated in all LibreOffice Calc cells in which this DDE link is defined.

ERRORTYPE

Tagastab arvu, mis vastab viidatud lahtris olevale vea koodile. Selle arvu abiga saab tekitada veateate teksti.

Vea korral tagastab funktsioon loogilise või arvulise väärtuse.

note

Kui klõpsata viga sisaldavale lahtrile, kuvatakse olekuribal LibreOffice'i eeldefineeritud veakoodi.


SĂĽntaks

ERRORTYPE(viide)

Viide sisaldab selle lahtri aadressi, kus viga ilmneb.

Näide

Kui lahtris A1 kuvatakse viga Err:518, tagastab funktsioon =ERRORTYPE(A1) arvu 518.

Technical information

This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

ORG.OPENOFFICE.ERRORTYPE

GETPIVOTDATA

Funktsioon GETPIVOTDATA tagastab tulemuseväärtuse liigendtabelist. Väärtuse aadressi jaoks kasutatakse välja- ja elemendinimesid, et see jääks kehtima ka liigendtabeli paigutuse muutumise korral.

SĂĽntaks

Kasutada võib kaht erinevat süntaksit:

GETPIVOTDATA(TargetField; pivot table[; Field 1; Item 1][; ... [Field 126; Item 126]])

või

GETPIVOTDATA(liigendtabel; piirangud)

Teist süntaksit eeldatakse, kui antud on täpselt kaks argumenti, millest esimene on viide lahtrile või lahtrite vahemikule. Kõikidel muudel juhtumitel eeldatakse esimest süntaksit. Funktsiooninõustaja kuvab esimest süntaksit.

First Syntax

Sihtväli on string, mis valib ühe liigendtabeli andmeväljadest. String võib olla lähteveeru nimi või andmevälja nimi tabelis kuvatud kujul (nt "Summa - Müük").

Liigendtabel on viide lahtrile või lahtrivahemikule, mis asub liigendtabelis või sisaldab liigendtabelit. Kui lahtrivahemik sisaldab mitut liigendtabelit, kasutatakse viimati loodud tabelit.

Kui paarid väli n / element n on antud, tagastatakse kokkuvõte. Muul juhul lisab iga paar piirangu, mida tulemus peab täitma. Väli n on liigendtabeli välja nimi. Element n on sellelt väljalt pärineva elemendi nimi.

Kui liigendtabel sisaldab ainult ühte tulemuseväärtust, mis täidab kõik piirangud, või vahekokkuvõtet, mis summeerib kõik vastavad väärtused, tagastatakse tulemus. Kui vastavaid tulemusi pole või kui mitmel tulemusel pole vahekokkuvõtet, tagastatakse viga. Need tingimused kehtivad tulemustele, mis on liigendtabelisse kaasatud.

Kui lähteandmed sisaldavad kirjeid, mida liigendtabeli sätted peidavad, siis neid ignoreeritakse. Välja ja elemendi paaride järjestus pole oluline. Välja- ja elemendinimed pole tõstutundlikud.

If no constraint for a filter is given, the field's selected value is implicitly used. If a constraint for a filter is given, it must match the field's selected value, or an error is returned. Filters are the fields at the top left of a pivot table, populated using the "Filters" area of the pivot table layout dialog. From each filter, an item (value) can be selected, which means only that item is included in the calculation.

Liigendtabeli vahekokkuvõtete väärtusi kasutatakse ainult juhul, kui need kasutatavad funktsiooni "automaatne" (v.a juhul, kui need on määratud piirangus; vt allpool lõiku Teine süntaks).

Second Syntax

Liigendtabel on sama tähendusega nagu esimeses süntaksis.

Piirangud on tühikutega eraldatud loend. Kirjed võivad olla jutumärkides (ühekordsetes jutumärkides). Terve string peab olema jutumärkides (topeltjutumärkides), kui te just ei viita stringile mõnest teisest lahtrist.

Üks kirje võib olla andmevälja nimi. Andmevälja nime võib välja jätta, kui liigendtabel sisaldab ainult ühte andmevälja; muul juhul peab nimi olema määratud.

Iga muu kirje määrab piirangu kujul Väli[Element] (literaalimärkidega [ ja ]) või ainult kujul Element, kui elemendi nimi on kõigil liigendtabelis kasutatud väljadel unikaalne.

Funktsiooninime saab lisada kujul Väli[Element;Funktsioon]; sel juhul vastendatakse piirangut ainult seda funktsiooni kasutavate vahekokkuvõtete väärtustega. Võimalikud funktsiooninimed on Sum, Count, Average, Max, Min, Product, Count (ainult arvud), StDev (valim), StDevP (populatsioon), Var (valim) ja VarP (populatsioon); tõstutundetu.

HLOOKUP

Otsib väärtust, viidates selle leidmisel valitud ala all olevale lahtrile. Funktsioon kontrollib, kas massiivi esimene rida sisaldab määratud väärtust. Seejärel tagastab funktsioon leitud lahtriga samas veerus oleva parameetriga indeks määratud rea lahtri sisu.

The search supports wildcards or regular expressions. With regular expressions enabled, you can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must either precede every regular expression metacharacter or operator with a "\" character, or enclose the text into \Q...\E. You can switch the automatic evaluation of wildcards or regular expression on and off in - LibreOffice Calc - Calculate.

warning

When using functions where one or more arguments are search criteria strings that represents a regular expression, the first attempt is to convert the string criteria to numbers. For example, ".0" will convert to 0.0 and so on. If successful, the match will not be a regular expression match but a numeric match. However, when switching to a locale where the decimal separator is not the dot makes the regular expression conversion work. To force the evaluation of the regular expression instead of a numeric expression, use some expression that can not be misread as numeric, such as ".[0]" or ".\0" or "(?i).0".


SĂĽntaks

HLOOKUP(Lookup; Array; Index [; SortedRangeLookup])

For an explanation on the parameters, see: VLOOKUP (columns and rows are exchanged)

Tühjade lahtrite käsitlemine

Näide

Suppose we have built a small database table occupying the cell range A1:DO4 and containing basic information about 118 chemical elements. The first column contains the row headings “Element”, “Symbol”, “Atomic Number”, and “Relative Atomic Mass”. Subsequent columns contain the relevant information for each of the elements, ordered left to right by atomic number. For example, cells B1:B4 contain “Hydrogen”, “H”, “1” and “1.008”, while cells DO1:DO4 contain “Oganesson”, “Og”, “118”, and “294”.

A

B

C

D

...

DO

1

Element

Hydrogen

Helium

Lithium

...

Oganesson

2

Symbol

H

He

Li

...

Og

3

Atomic Number

1

2

3

...

118

4

Relative Atomic Mass

1.008

4.0026

6.94

...

294


=HLOOKUP("Lead"; $A$1:$DO$4; 2; 0) returns “Pb”, the symbol for lead.

=HLOOKUP("Gold"; $A$1:$DO$4; 3; 0) returns 79, the atomic number for gold.

=HLOOKUP("Carbon"; $A$1:$DO$4; 4; 0) returns 12.011, the relative atomic mass of carbon.

HYPERLINK

Kui klõpsata lahtrile, mis sisaldab funktsiooni HYPERLINK, avaneb hüperlink.

If you use the optional CellValue parameter, the formula locates the URL, and then displays the text or number.

tip

HĂĽperlingiga lahtri avamiseks klaviatuuri abil vali lahter, vajuta redigeerimisreĹľiimi sisenemiseks F2, vii kursor hĂĽperlingi ette, vajuta Shift+F10 ja vali Ava hĂĽperlink.


SĂĽntaks

HYPERLINK("URL" [; CellValue])

URL specifies the link target. The optional CellValue parameter is the text or a number that is displayed in the cell and will be returned as the result. If the CellValue parameter is not specified, the URL is displayed in the cell text and will be returned as the result.

TĂĽhjade lahtrite ja maatriksielementide korral tagastatakse arv 0.

Näide

=HYPERLINK("http://www.example.org") displays the text "http://www.example.org" in the cell and executes the hyperlink http://www.example.org when clicked.

=HYPERLINK("http://www.example.org";"Click here") displays the text "Click here" in the cell and executes the hyperlink http://www.example.org when clicked.

=HYPERLINK("http://www.example.org";12345) displays the number 12345 and executes the hyperlink http://www.example.org when clicked.

=HYPERLINK($B4) where cell B4 contains http://www.example.org. The function adds http://www.example.org to the URL of the hyperlink cell and returns the same text which is used as formula result.

=HYPERLINK("http://www.";"Click ") & "example.org" displays the text Click example.org in the cell and executes the hyperlink http://www.example.org when clicked.

=HYPERLINK("#Sheet1.A1";"Go to top") displays the text Go to top and jumps to cell Sheet1.A1 in this document.

=HYPERLINK("file:///C:/writer.odt#Specification";"Go to Writer bookmark") displays the text "Go to Writer bookmark", loads the specified text document and jumps to bookmark "Specification".

=HYPERLINK("file:///C:/Documents/";"Open Documents folder") displays the text "Open Documents folder" and shows the folder contents using the standard file manager in your operating system.

INDEX

INDEX returns a reference, a value or an array of values from a reference range, specified by row and column index number or array of row and array of columns index numbers, and an optional range index.

INDEX() returns a reference if the argument is one or more references. When used in a cell in the form =INDEX(), the reference is resolved and the values displayed. When INDEX() is used in arguments of other functions, =FUNCTION(INDEX()...), the function gets the reference passed that was returned by INDEX(). Returning a reference is different from returning an array of values for functions that handles them differently.

SĂĽntaks

INDEX(Reference [; [Row] [; [Column] [; Range]]])

Reference is a reference, entered either directly or by specifying a range name. If the reference consists of multiple ranges, you must enclose the list of references or range names in parentheses, or either use the tilde (~) range concatenation operator or define a named range with multiple areas.

Row (optional) represents the row or the array of row indexes of the reference range, for which to return a value. In case of zero or omitted (no specific row) all referenced rows are returned.

Column (optional) represents the column or array of column indexes of the reference range, for which to return a value. In case of zero or omitted (no specific column) all referenced columns are returned.

note

If Row, Column or both are omitted or defined as arrays of indexes, the INDEX function must be entered as an array function.


Range (optional) represents the index of the subrange if referring to a multiple range, default is 1.

Näide

{=INDEX({1,3,5;7,9,10},{2;1},1)} return a 2 row array containing 7 and 1. The row index {2;1} pick row 2 then row 1. The columns index 1 picks the first column.

{=INDEX(D3:G12,{1;2;3;4},{3,1})} return a 4 rows by 2 columns array. The row index array {1;2;3;4} picks rows 3 to 6 and {3;1} picks the third (F) and first column (D). Columns 1 and 3 of the source reference are swapped in the resulting array.

=INDEX(Hinnad;4;1) tagastab väärtuse, mis asub aknas Andmed - Määra vahemik nimega Hinnad määratud andmebaasivahemikus reas 4 ja veerus 1.

=INDEX(SumX;4;1) returns the value from the range SumX in row 4 and column 1 as defined in Sheet - Named Ranges and Expressions - Define.

{=INDEX(A1:B6;1)} returns the values of the first row of A1:B6. Enter the formula as an array formula.

{=INDEX(A1:B6;0;1)} returns the values of the first column of A1:B6. Enter the formula as an array formula.

=INDEX(A1:B6;1;1) osutab vahemiku A1:B6 vasakpoolses ülanurgas asuvale väärtusele.

{=INDEX((A1:B6;C1:D6);0;0;2)} returns the values of the second range C1:D6 of the multiple range. Enter the formula as an array formula.

INDIRECT

Tagastab tekstistringiga määratud viite. Funktsioon võib tagastada ka stringiga määratud lahtrite vahemiku.

This function is always recalculated whenever a recalculation occurs.

Koostalitlusvõime huvides toetavad funktsioonid ADDRESS ja INDIRECT mittekohustuslikku parameetrit, mille abil saab määrata, kas tavapärase A1-kuju asemel tuleks kasutada aadressikuju R1V1.

Funktsioonis ADDRESS lisatakse see parameeter neljanda parameetrina, mis nihutab mittekohustusliku lehenime parameetri viiendale positsioonile.

Funktsioonis INDIRECT lisatakse parameeter teise parameetrina.

Kui argument sisestatakse väärtusega 0, kasutatakse mõlema funktsiooni korral kujul R1V1. Kui argumenti ei ole antud või selle väärtus pole 0, kasutatakse kuju A1.

R1V1-tähistuse korral tagastab ADDRESS aadressistringid kasutades lehenimede eraldajana hüüumärki '!' ning funktsioon INDIRECT eeldab lehenimede eraldajana hüüumärki. A1-tähistuse korral kasutavad mõlemad funktsioonid lehenimede eraldajana punkti '.'.

When opening documents from ODF 1.0/1.1 format, the ADDRESS functions that show a sheet name as the fourth parameter will shift that sheet name to become the fifth parameter. A new fourth parameter with the value 1 will be inserted.

Kui dokument salvestatakse ODF 1.0/1.1 vormingus ja ADDRESS-funktsioonidel on neljas parameeter, siis see parameeter eemaldatakse.

note

Ära salvesta arvutustabelit vanas ODF 1.0/1.1 vormingus, kui funktsiooni ADDRESS uus neljas parameeter on kasutatud väärtusega 0.


note

Funktsioon INDIRECT salvestatakse ilma ODF 1.0/1.1 vormingusse teisendamata. Kui teine parameeter oli olemas, tagastab Calci vanem versioon selle funktsiooni korral veaväärtuse.


SĂĽntaks

INDIRECT(viide [; A1])

Viide on viide lahtrile või alale (teksti kujul), mille sisu tagastada.

A1 (mittekohustuslik) - kui see väärtus on 0, kasutatakse R1V1-tähistust. Kui see parameeter puudub või selle väärtus pole 0, kasutatakse A1-tähistust.

note

If you open an Excel spreadsheet that uses indirect addresses calculated from string functions, the sheet addresses will not be translated automatically. For example, the Excel address in INDIRECT("[filename]sheetname!"&B1) is not converted into the Calc address in INDIRECT("filename#sheetname."&B1).


Näide

=INDIRECT(A1) võrdub 100, kui lahter A1 sisaldab viidet C108 ja lahter C108 sisaldab väärtust 100.

=SUM(INDIRECT("a1:" & ADDRESS(1;3))) liidab ala A1 lahtrite väärtused kuni lahtrini, mille aadress on määratud reaga 1 ja veeruga 3. See tähendab, et liidetakse ala A1:C1 väärtused.

LOOKUP

Returns the contents of a cell either from a one-row or one-column range. Optionally, the assigned value (of the same index) is returned in a different column and row. As opposed to VLOOKUP and HLOOKUP, search and result vector may be at different positions; they do not have to be adjacent. Additionally, the search vector for the LOOKUP must be sorted ascending, otherwise the search will not return any usable results.

note

Kui LOOKUP ei leia otsingukriteeriumi, leiab funktsioon vastavuse suurimale väärtusele otsinguvektoris, mis on väiksem sisestatud kriteeriumist või võrdne sellega.


The search supports wildcards or regular expressions. With regular expressions enabled, you can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must either precede every regular expression metacharacter or operator with a "\" character, or enclose the text into \Q...\E. You can switch the automatic evaluation of wildcards or regular expression on and off in - LibreOffice Calc - Calculate.

warning

When using functions where one or more arguments are search criteria strings that represents a regular expression, the first attempt is to convert the string criteria to numbers. For example, ".0" will convert to 0.0 and so on. If successful, the match will not be a regular expression match but a numeric match. However, when switching to a locale where the decimal separator is not the dot makes the regular expression conversion work. To force the evaluation of the regular expression instead of a numeric expression, use some expression that can not be misread as numeric, such as ".[0]" or ".\0" or "(?i).0".


SĂĽntaks

LOOKUP(Lookup; SearchVector [; ResultVector])

Lookup is the value of any type to be looked for; entered either directly or as a reference.

Otsinguvektor on üherealine või üheveeruline ala, kust otsida.

Tulemusvektor on teine üherealine või üheveeruline vahemik, kust funktsiooni tulemus võetakse. Tulemus on tulemusvektori lahter, millel on otsinguvektorist leitud eksemplariga sama indeks.

Tühjade lahtrite käsitlemine

Näide

=LOOKUP(A1;D1:D100;F1:F100) otsib vahemikust D1:D100 lahtrisse A1 sisestatud arvule vastavat lahtrit. Leitud üksuse korral määratakse kindlaks selle indeks, näiteks selle vahemiku 12. lahter. Seejärel tagastatakse 12. lahtri sisu selle funktsiooni väärtusena (tulemusvektoris).

MATCH

Tagastab massiivi elemendi, mis vastab määratud väärtusele, suhtelise aadressi massiivis. Funktsioon tagastab otsingumassiivis leitud väärtuse asukoha arvuna.

SĂĽntaks

MATCH(Search; LookupArray [; Type])

Search is the value which is to be searched for in the single-row or single-column array.

Otsingumassiiv on otsitav viide. Otsingumassiiv võib olla üks rida või veerg või ühe rea või veeru osa.

Tüüp võib olla väärtus 1, 0 või -1. Kui tüüp = 1 või kui see mittekohustuslik parameeter puudub, siis eeldatakse, et otsingumassiivi esimene veerg on sorditud kasvavas järjestuses. Kui tüüp = -1, siis eeldatakse, et veerg on sorditud kahanevas järjestuses. See vastab samale funktsioonile Microsoft Excelis.

If Type = 0, only exact matches are found. If the search criterion is found more than once, the function returns the index of the first matching value. Only if Type = 0 can you search for regular expressions (if enabled in calculation options) or wildcards (if enabled in calculation options).

If Type = 1 or the third parameter is missing, the index of the last value that is smaller or equal to the search criterion is returned. For Type = -1, the index of the last value that is larger or equal is returned.

The search supports wildcards or regular expressions. With regular expressions enabled, you can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must either precede every regular expression metacharacter or operator with a "\" character, or enclose the text into \Q...\E. You can switch the automatic evaluation of wildcards or regular expression on and off in - LibreOffice Calc - Calculate.

warning

When using functions where one or more arguments are search criteria strings that represents a regular expression, the first attempt is to convert the string criteria to numbers. For example, ".0" will convert to 0.0 and so on. If successful, the match will not be a regular expression match but a numeric match. However, when switching to a locale where the decimal separator is not the dot makes the regular expression conversion work. To force the evaluation of the regular expression instead of a numeric expression, use some expression that can not be misread as numeric, such as ".[0]" or ".\0" or "(?i).0".


Näide

=MATCH(200;D1:D100) otsib alast D1:D100, mis on sorditud veeru D aluse, väärtust 200. Kohe, kui jõutakse selle väärtuseni, tagastatakse selle rea number, kust väärtus leiti. Kui veerust otsimisel leitakse suurem väärtus, tagastatakse eelmise rea number.

OFFSET

Tagastab viidatud lahtrist määratud arvu ridade ja veergude kaugusel oleva lahtri väärtuse.

This function is always recalculated whenever a recalculation occurs.

SĂĽntaks

OFFSET(Reference; Rows; Columns [; Height [; Width]])

Viide on viide, kust funktsioon otsib uut viidet.

Read on nende ridade arv, mille võrra viidet on korrigeeritud ülespoole (negatiivne väärtus) või allapoole.

Read on nende ridade arv, mille võrra viidet on korrigeeritud ülespoole (negatiivne väärtus) või allapoole.

Kõrgus (mittekohustuslik) on uuest viiteasukohast algava ala vertikaalne kõrgus.

Laius (mittekohustuslik) on uuest viiteasukohast algava ala horisontaalne laius.

Argumendid read ja veerud ei tohi põhjustada algusrea või -veeru negatiivset ega nullväärtust.

Argumendid kõrgus ja laius ei tohi põhjustada ridade või veergude arvu negatiivset ega nullväärtust.

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

=OFFSET(A1;2;2) tagastab väärtuse lahtris C3 (A1 nihe kahe rea ja kahe veeru võrra allapoole). Kui C3 sisaldab väärtust 100, tagastab see funktsioon vastusena 100.

=OFFSET(B2:C3;1;1) tagastab viite vahemikule B2:C3, mis on nihutatud ühe rea võrra alla ja ühe veeru võrra paremale (C3:D4).

=OFFSET(B2:C3;-1;-1) tagastab viite vahemikule B2:C3, mis on nihutatud ühe rea võrra üles ja ühe veeru võrra vasakule (A1:B2).

=OFFSET(B2:C3;0;0;3;4) tagastab viite vahemikule B2:C3, mille suurust on muudetud nii, et see on nĂĽĂĽd 3 rida ja 4 veergu (B2:E4).

=OFFSET(B2:C3;1;0;3;4) tagastab viite vahemikule B2:C3, mis on nihutatud ühe rea võrra allapoole ja mille suurust on muudetud nii, et see on nüüd 3 rida ja 4 veergu (B2:E4).

=SUM(OFFSET(A1;2;2;5;6)) määrab selle ala summa, mis algab lahtrist C3 ning mille kõrgus on 5 rida ja laius 6 veergu (ala=C3:H7).

note

If Width or Height are given, the OFFSET function returns a cell range reference. If Reference is a single cell reference and both Width and Height are omitted, a single cell reference is returned.


ROW

Returns the row number of a cell reference. If the reference is a cell, it returns the row number of the cell. If the reference is a cell range, it returns the corresponding row numbers in a one-column Array if the formula is entered as an array formula. If the ROW function with a range reference is not used in an array formula, only the row number of the first range cell will be returned.

SĂĽntaks

ROW([viide])

Viide on lahter, vahemik või vahemiku nimi.

Kui viide puudub, leitakse selle lahtri rea number, kuhu valem on sisestatud. LibreOffice Calc määrab viite aktiivsele lahtrile automaatselt.

Näide

=ROW(B3) tagastab 3, kuna viide viitab tabeli kolmandale reale.

{=ROW(D5:D8)} tagastab üheveerulise massiivi (5, 6, 7, 8), kuna määratud viide sisaldab ridu 5 kuni 8.

=ROW(D5:D8) tagastab 5, kuna funktsiooni ROW ei kasutata massiivi valemina. (Sel juhul tagastatakse alati ainult viite esimese rea number.)

{=ROW(A1:E1)} ja =ROW(A1:E1) tagastavad mõlemad 1, kuna viide sisaldab tabeli esimese reana ainult rida 1. (Kuna üherealistes vahemikes on ainult üks reanumber, pole vahet, kas valemit kasutatakse massiivi valemina või mitte.)

=ROW() tagastab 3, kui valem sisestati reas 3.

{=ROW(Jänes)} tagastab üheveerulise massiivi (1, 2, 3), kui "Jänes" on nimega vahemik (C1:D3).

ROWS

Tagastab ridade arvu massiivis või vastavalt viitele.

SĂĽntaks

ROWS(massiiv)

Massiiv on viide või nimega ala, mille ridade koguarvu soovitakse määrata.

Näide

=Rows(B5) tagastab 1, kuna lahter sisaldab ainult ĂĽhte rida.

=ROWS(A10:B12) tagastab 3.

=ROWS(Jänes) tagastab 3, kui "Jänes" on nimega ala (C1:D3).

SHEET

Returns the sheet number of either a reference or a string representing a sheet name. If you do not enter any parameters, the result is the sheet number of the spreadsheet containing the formula.

SĂĽntaks

SHEET([viide])

Viide pole kohustuslik ja viitab lahtrile, alale või lehenimestringile.

Näide

=SHEET(Sheet2.A1) returns 2 if Sheet2 is the second sheet in the spreadsheet document.

=SHEET("Sheet3") returns 3 if Sheet3 is the third sheet in the spreadsheet document.

SHEETS

Tuvastab lehtede arvu viites. Kui argumendid puuduvad, tagastatakse aktiivse dokumendi lehtede arv.

SĂĽntaks

SHEETS([viide])

Viide on viide lehele või alale. See parameeter pole kohustuslik.

Näide

=SHEETS(Leht1.A1:Leht3.G12) tagastab 3, kui Leht1, Leht2 ja Leht3 on olemas määratud järjestuses.

VLOOKUP

Vertical search with reference to adjacent cells to the right. This function checks if a specific value is contained in the first column of an array. The function then returns the value in the same row of the column named by Index. If the Sorted parameter is omitted or set to TRUE or one, it is assumed that the data is sorted in ascending order. In this case, if the exact Lookup is not found, the last value that is smaller than the criterion will be returned. If Sorted is set to FALSE or zero, an exact match must be found, otherwise the error Error: Value Not Available will be the result. Thus with a value of zero the data does not need to be sorted in ascending order.

The search supports wildcards or regular expressions. With regular expressions enabled, you can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must either precede every regular expression metacharacter or operator with a "\" character, or enclose the text into \Q...\E. You can switch the automatic evaluation of wildcards or regular expression on and off in - LibreOffice Calc - Calculate.

warning

When using functions where one or more arguments are search criteria strings that represents a regular expression, the first attempt is to convert the string criteria to numbers. For example, ".0" will convert to 0.0 and so on. If successful, the match will not be a regular expression match but a numeric match. However, when switching to a locale where the decimal separator is not the dot makes the regular expression conversion work. To force the evaluation of the regular expression instead of a numeric expression, use some expression that can not be misread as numeric, such as ".[0]" or ".\0" or "(?i).0".


SĂĽntaks

=VLOOKUP(Lookup; Array; Index [; SortedRangeLookup])

Lookup is the value of any type looked for in the first column of the array.

Array is the reference, which is to comprise at least as many columns as the number passed in Index argument.

Indeks on massiivi selle veeru number, mis sisaldab tagastatavat väärtust. Esimese veeru number on 1.

SortedRangeLookup is an optional parameter that indicates whether the first column in the array contains range boundaries instead of plain values. In this mode, the lookup returns the value in the row with first column having value equal to or less than Lookup. E.g., it could contain dates when some tax value had been changed, and so the values represent starting dates of a period when a specific tax value was effective. Thus, searching for a date that is absent in the first array column, but falls between some existing boundary dates, would give the lower of them, allowing to find out the data being effective to the searched date. Enter the Boolean value FALSE or zero if the first column is not a range boundary list. When this parameter is TRUE or not given, the first column in the array must be sorted in ascending order. Sorted columns can be searched much faster and the function always returns a value, even if the search value was not matched exactly, if it is greater than the lowest value of the sorted list. In unsorted lists, the search value must be matched exactly. Otherwise the function will return #N/A with message: Error: Value Not Available.

Tühjade lahtrite käsitlemine

Näide

You want to enter the number of a dish on the menu in cell A1, and the name of the dish is to appear as text in the neighboring cell (B1) immediately. The Number to Name assignment is contained in the D1:E100 array. D1 contains 100, E1 contains the name Vegetable Soup, and so forth, for 100 menu items. The numbers in column D are sorted in ascending order; thus, the optional Sorted parameter is not necessary.

Sisesta lahtrisse B1 järgmine valem:

=VLOOKUP(A1;D1:E100;2)

Niipea kui sisestad arvu lahtrisse A1, kuvab lahter B1 vastavat teksti, mis asub viidatud ala D1:E100 teises veerus. Kui sisestada arv, mida esimene veerg ei sisalda, tagastatakse lähimale väiksemale arvule vastav tekst. Kui sa ei soovi seda, sisesta neljanda parameetrina VÄÄR, siis tagastatakse esimesest veerust puuduva arvu sisestamisel veateade.

Palun toeta meid!