스프레드시트 함수

이 섹션은 예제와 함께 스프레드시트 함수에 대한 설명을 담고 있습니다.

이 명령을 사용하려면...

삽입 - 함수 - 범주 스프레드시트


[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

지정한 행 번호와 열 번호에 따라 셀 주소(참조)를 텍스트로 반환합니다. 주소를 절대 주소(예: $A$1), 상대 주소(예: A1) 또는 혼합 형태(예: A$1 또는 $A1) 중에서 어떤 유형으로 인식할지를 지정할 수 있습니다. 시트 이름을 지정할 수도 있습니다.

상호 운용성을 위해, ADDRESS 와 INDIRECT 함수는 일반적인 A1 표기 대신 R1C1 주소 표기를 사용해서 지정하는지에 대한 추가적인 매개 변수를 지원합니다.

ADDRESS 에서는, 임의의 시트 이름 매개 변수를 다섯번째로 옮기면서, 매개 변수는 네번째로 삽입됩니다.

INDIRECT 에서는, 매개 변수는 두번째 매개 변수로 추가됩니다.

두개 모두의 함수에서, 인자가 0 값으로 삽입되면, R1C1 표기가 쓰여집니다. 만약 인자가 주어지지 않거나 0 이 아닌 다른 값이면, A1 표기가 쓰여집니다.

R1C1 표기의 경우, ADDRESS 는 시트 이름 구분자로서 느낌표 '!' 를 사용하는 주소 문자열을 반환하고, INDIRECT 는 느낌표를 시트 이름 구분자로 사용합니다. 그리고 두 함수 모두 마침표 '.' 를 A1 표기처럼 시트 이름 구분자로 사용합니다.

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.

ODF 1.0/1.1 형식으로 문서를 저장할 때, 만약 ADDRESS 함수가 네번째 매개 변수를 가지고 있으면, 이 매개 변수는 제거됩니다.

note

ADDRESS 함수의 새로운 네번째 매개 변수가 0 의 값을 가진다면, 예전의 ODF 1.0/1.1 형식으로 스프레드시트를 저장하지 마십시오.


note

ODF 1.0/1.1 형식에서 INDIRECT 함수는 변환없이 저장됩니다. 두번째 매개 변수가 존재하면, 예전 버전의 Calc 는 오류를 반환합니다.


Syntax

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

은 셀 참조 영역의 행 번호를 의미합니다.

은 참조할 열 번호를 나타내며, 알파벳이 아닌 열의 순서대로 번호를 붙여 사용합니다.

Abs는 참조의 종류를 지정합니다.

1: 절대($A$1)

2: 행, 절대적; 열, 상대적 (A$1)

3: 행, 상대적; 열, 절대적 ($A1)

4: 상대적 (A1)

A1이 0이면 R1C1 표기를 사용합니다. 매개 변수가 없거나 0이 아닌 다른 값이면, A1 표기를 사용합니다 (선택 사항)

시트는 시트의 이름을 말합니다. 항상 겹따옴표("")로 싸여있어야 합니다.

=ADDRESS(1;1;2;"Sheet2")는 Sheet2.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

다중 범위에 속하는 개별 범위의 수를 구합니다. 범위는 인접한 셀 또는 단일 셀로 구성될 수 있습니다.

이 함수는 단일 개요 예외가 있습니다, 다수 범위를 두었을 때에는 반드시 사이에 삽입 어구를 넣어야 합니다. 다수 범위는 분리 기호로 세미콜론(;)을 넣을 수 있지만, 자동으로 물결 표시(~)로 변환하게 됩니다. 물결 표시는 범위를 잇는 데 사용됩니다.

Syntax

AREAS(참조)

참조는 셀이나 셀 영역에 대한 참조입니다.

Example

=AREAS((A1:B3;F2;G1))는 세 셀 및 영역을 참조하므로 3을 반환합니다. 이후에 들어간 부분은 =AREAS((A1:B3~F2~G1))로 변환됩니다.

만일 데이터 - 범위 정의 메뉴에서 All이라는 이름의 영역을 지정했다면 =AREAS(All) 함수는 1을 반환합니다.

CHOOSE

색인을 사용하여 최대 30개의 값 목록에서 값을 구합니다.

Syntax

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

1과 30 사이의 수 또는 참조인 인덱스는 목록에서 어떤 값을 선택할지 지정합니다.

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

Example

=CHOOSE(A1;B1;B2;B3;"오늘";"어제";"내일")을 입력한다고 가정하면 A1이 2일 경우 결과값은 B2 셀의 값이 되고 A1 셀의 값이 4일 경우는 문자열 "오늘"이 됩니다.

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.

Syntax

COLUMN([Reference])

참조는 열 번호를 구해야 하는 하나의 셀 또는 셀 영역에 대한 참조입니다.

참조가 지정되지 않으면, 수식이 입력되는 셀의 열 번호가 산출됩니다. LibreOffice Calc는 자동으로 현재 셀에 대한 참조를 설정합니다.

Example

=COLUMN(A1)는 1과 같습니다. A열은 표의 첫번째 열입니다.

=COLUMN(C3:E3)은 3과 같습니다. C열은 표에서 세 번째 열입니다.

D 열은 표에서 네번째 열이고 COLUMN 함수를 배열 함수로 사용할 수 없기 때문에 =COLUMN(D3:G10)는 4를 반환합니다. (이 상황에서는 배열의 첫 값이 항상 결과로 사용됩니다.)

{=COLUMN(B2:B7)}=COLUMN(B2:B7)은 참조가 테이블에서 두번째 열인 B 열만 포함하기 때문에 2 를 반환합니다. 단일 열 영역은 열 번호가 하나 뿐이므로 배열 함수를 이용하지 않으면 차이를 볼 수 없습니다.

만일 C 열에 =COLUMN()를 입력한다면 이 함수는 3을 결과로 반환할 것입니다.

C1:D3 영역의 이름이 "Rabbit"으로 지정되어 있을 경우 {=COLUMN(Rabbit)}는 단일행 배열 (3, 4)를 반환합니다.

COLUMNS

주어진 참조의 열 수를 구합니다.

Syntax

COLUMNS(배열)

배열은 찾을 열의 총 수를 가진 셀 범위에 대한 참조입니다. 인수로 한 개의 셀을 사용할 수도 있습니다.

Example

셀이 한 열에 걸쳐 지정되어 있으므로 =COLUMNS(B5)은 1을 반환합니다.

=COLUMNS(A1:C5)는 3과 같습니다. 세 열을 참조합니다.

=COLUMNS(Rabbit)Rabbit이 (C1:D3) 영역에 있을 경우 2를 반환합니다.

DDE

DDE 기반 링크의 결과를 구합니다. 연결된 범위나 구역의 내용이 변경되면 구해진 값도 변경됩니다. 업데이트된 링크를 보려면 스프레드시트를 다시 로드하거나 편집 - 링크를 선택해야 합니다. 상호 플랫폼 링크(예: Windows 시스템에서 실행 중인 LibreOffice 설치에서 Linux 시스템에서 작성한 문서로의 링크)는 허용되지 않습니다.

Syntax

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

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

파일은 올바른 경로가 있는 파일의 이름입니다.

영역는 데이터를 읽어들일 범위입니다.

Mode는 DDE 서버의 데이터를 숫자로 변환하는 방법을 지정하는 선택 사항 매개 변수입니다.

Mode

Effect

0 또는 없음

"표준" 셀 유형의 숫자 서식

1

데이터는 항상 미국식 영어의 표준 서식으로 해석됩니다

2

데이터는 텍스트로 적용되며 숫자로 바뀌지 않습니다


Example

=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

다른 셀에서 발생한 오류 값에 해당하는 숫자를 구합니다. 이 숫자를 사용하여 오류 메시지 텍스트를 생성할 수 있습니다.

오류가 발생하면 논리 값이나 숫자 값이 반환됩니다.

note

오류가 포함된 셀을 클릭하면 상태 표시줄은 LibreOffice의 미리 정의된 오류 코드를 표시합니다.


Syntax

ERRORTYPE(참조)

참조는 오류가 발생한 셀의 주소를 포함합니다.

Example

만일 A1 셀이 Err:518 에러 메시지를 출력한다면 =ERRORTYPE(A1) 함수로 정수 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

The GETPIVOTDATA 함수는 DataPilot 테이블로부터 결과값을 반환합니다. 이 값은 필드와 아이템 이름을 써서 정해지므로, DataPilot 테이블의 레이아웃이 변했을 경우에도 여전히 유효합니다.

Syntax

두 개의 서로 다른 구문 정의를 사용할 수 있음:

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

or

GETPIVOTDATA(데이터 파일럿; 제약)

두 번째 구문은 정확하게 두 개의 매개 변수가 지정된 경우 첫 번째 매개 변수는 셀 또는 셀 영역 참조라고 가정합니다. 첫 번째 구문은 모든 다른 경우를 가정합니다. 이 함수 마법사는 첫 번째 구문을 보여줍니다.

First Syntax

대상필드는 데이터파일럿 테이블의 데이터 필드 중 하나를 선택하는 문자열입니다. 문자열은 원본열의 이름이거나 테이블에 있는 데이터 필드명도 가능합니다.(예: "합계 - 판매").

데이터 파일럿은 데이터 파일럿 테이블에 위치하거나 데이터 파일럿 테이블을 포함하는 셀 또는 셀 범위의 참조입니다. 만약 셀 범위가 다수의 데이터 파일럿 테이블을 포함하고 있으면, 마지막에 생성된 테이블이 사용됩니다.

If no 필드 n / 항목 n의 쌍이 부여되고, 전체 합계가 반환되었습니다. 그렇지 않으면, 각각의 쌍은 결과를 만족시켜야 하는 제약을 추가합니다. 필드 n 은(는) 데이터 파일럿 테이블로부터의 필드명입니다. 항목 n 은(는) 그 필드로부터의 한 항목명입니다.

만약 데이터 파일럿 테이블이 모든 제약을 만족하는 단일 결과값 또는 모든 일치하는 값을 요약하는 소계만을 포함하고 있다면, 그 결과가 반환됩니다. 만약 일치하는 결과가 없거나, 소계없이 결과가 많으면 오류가 반환됩니다. 이러한 조건은 데이터 파일럿 테이블에 포함된 결과에 적용됩니다.

만약 원본 데이터가 데이터 파일럿의 설정에 의해 숨겨진 항목을 포함하고 있으면, 이는 무시됩니다. 필드/항목 쌍의 순서는 유효하지 않습니다. 필드 및 항목의 이름은 대/소문자를 구별하지 않습니다.

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.

DataPilot 테이블로부터 나온 소계값은 이 값이 "자동" 함수를 썼을 경우에만 쓰입니다.(제약 조건이 지정되었을 때에는 예외로, 아래 Second Syntax를 참조합니다).

Second Syntax

데이터 파일럿은 첫 번째 구문과 같은 의미를 가집니다.

제약은 공백으로 분리된 목록입니다. 항목은 따옴표로 묶을 수 있습니다(작은 따옴표). 모든 문자열은 다른 셀로부터 문자열이 참조되지 않는 한 따옴표로 묶어야 합니다(큰 따옴표).

엔트리 가운데 하나는 데이터 필드 이름일 수 있습니다. 이 데이터 필드 이름은 DataPilot 테이블이 데이터 필드를 단 하나만 포함하고 있을 때에는 무시될 수 있으며, 그밖에 경우에는 존재해야 합니다.

각각의 다른 항목은 필드[Item] 양식으로 제약을 지정합니다 (상수 문자 [ ] 사용). 항목 이름이 데이터 파일럿 테이블에서 사용 중인 모든 필드에서 고유할 경우 항목을 항목 만으로 할 수 있습니다.

필드[항목;함수] 양식에서 함수명을 추가할 수 있습니다. 이럴 경우 그 함수를 사용한 부분합 값하고만 일치하는 제한 조건이 생깁니다. 여기에 사용할 수 있는 함수는 Sum, Count, Average, Max, Min, Product, Count(숫자만), StDev(표본), StDevP(집단), Var(표본), VarP(집단) 등이며, 대소문자를 구별하지 않습니다.

HLOOKUP

선택한 영역 아래의 셀에 대한 참조와 값을 검색합니다. 이 함수는 배열의 첫 번째 행에 특정 값이 포함되어 있는지 확인합니다. 그런 다음 이 함수는 동일한 열의 색인에서 명명된 배열 행의 값을 구합니다.

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


Syntax

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

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

빈 셀 처리

Example

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

HYPERLINK 함수가 포함된 셀을 클릭하면 하이퍼링크가 열립니다.

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

tip

키보드를 사용하여 하이퍼링크 셀을 열려면, 셀을 선택하고 F2 키를 눌러 편집 모드로 들어갑니다. 그런 다음 하이퍼링크의 맨 앞으로 커서를 이동하고 Shift + F10 을 누른 다음 하이퍼링크 열기를 선택합니다.


Syntax

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.

빈 셀과 행렬 원소는 숫자 0을 반환합니다.

Example

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

Syntax

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.

Example

{=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(Prices;4;1)데이터 - 정의에서 Prices이라고 정의한 데이터베이스 범위에서 4 개의 행과 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)는 A1:B6 범위에서 위에서부터 첫번째, 왼쪽에서 첫번째의 셀을 의미합니다.

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

텍스트 문자열에 지정된 참조를 구합니다. 또한 이 함수를 사용하여 해당 문자열의 영역을 구할 수 있습니다.

This function is always recalculated whenever a recalculation occurs.

상호 운용성을 위해, ADDRESS 와 INDIRECT 함수는 일반적인 A1 표기 대신 R1C1 주소 표기를 사용해서 지정하는지에 대한 추가적인 매개 변수를 지원합니다.

ADDRESS 에서는, 임의의 시트 이름 매개 변수를 다섯번째로 옮기면서, 매개 변수는 네번째로 삽입됩니다.

INDIRECT 에서는, 매개 변수는 두번째 매개 변수로 추가됩니다.

두개 모두의 함수에서, 인자가 0 값으로 삽입되면, R1C1 표기가 쓰여집니다. 만약 인자가 주어지지 않거나 0 이 아닌 다른 값이면, A1 표기가 쓰여집니다.

R1C1 표기의 경우, ADDRESS 는 시트 이름 구분자로서 느낌표 '!' 를 사용하는 주소 문자열을 반환하고, INDIRECT 는 느낌표를 시트 이름 구분자로 사용합니다. 그리고 두 함수 모두 마침표 '.' 를 A1 표기처럼 시트 이름 구분자로 사용합니다.

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.

ODF 1.0/1.1 형식으로 문서를 저장할 때, 만약 ADDRESS 함수가 네번째 매개 변수를 가지고 있으면, 이 매개 변수는 제거됩니다.

note

ADDRESS 함수의 새로운 네번째 매개 변수가 0 의 값을 가진다면, 예전의 ODF 1.0/1.1 형식으로 스프레드시트를 저장하지 마십시오.


note

ODF 1.0/1.1 형식에서 INDIRECT 함수는 변환없이 저장됩니다. 두번째 매개 변수가 존재하면, 예전 버전의 Calc 는 오류를 반환합니다.


Syntax

INDIRECT(Ref [; A1])

참조는 내용을 반환하기 위한 셀이나 영역(텍스트 폼)의 참조 범위입니다.

A1이 0이면 R1C1 표기를 사용합니다. 매개 변수가 없거나 0이 아닌 다른 값이면, A1 표기를 사용합니다 (선택 사항)

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


Example

만일 A1 셀의 값이 C108이고 C108 셀의 값이 100일 경우 =INDIRECT(A1)의 결과값은 100이 됩니다.

=SUM(INDIRECT("a1:" & ADDRESS(1;3)))은 A1셀부터 ADDRESS함수에 지정된 부분, 즉 1행 3열의 셀까지를 합산합니다. 다시말하면 A1:C1 범위의 셀 값이 합산되는 것입니다.

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

LOOKUP 함수는 검색 기준을 찾을 수 없는 경우 검색 기준보다 작거나 같은 검색 벡터에서 가장 큰 값을 일치시킵니다.


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


Syntax

LOOKUP(Lookup; SearchVector [; ResultVector])

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

벡터찾기는 찾으려는 영역에 있는 하나의 행이나 열입니다.

결과벡터는 함수의 결과값을 취할 단일행이나 단일열 범위를 의미합니다. 검색 벡터에서 찾은 값과 같은 결과를 취합니다.

빈 셀 처리

Example

=LOOKUP(A1;D1:D100;F1:F100)는 D1:D100 범위 안에서 A1셀에 들어있는 값과 일치하는 값을 지닌 셀을 검색합니다. 해당되는 셀이 검색된 경우 그 셀의 결과값을 결과 벡터 형태로 반환합니다.

MATCH

지정된 값과 일치하는 배열의 항목에 대한 상대 위치를 구합니다. 이 함수는 검색 배열에서 발견된 값의 위치를 숫자로 구합니다.

Syntax

MATCH(Search; LookupArray [; Type])

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

검색배열는 찾은 참조입니다. 검색 배열은 하나의 행이나 열이 될 수도 있고, 행이나 열의 일부가 될 수도 있습니다.

Type은 1, 0 또는 -1을 값으로 가질 수 있습니다. 유형 = 1이거나 이 선택적 매개 변수가 누락되면 검색 배열의 첫 번째 열이 오름차순으로 정렬된다고 가정합니다. 유형 = -1이면 열이 내림차순으로 정렬된다고 가정합니다. 이 함수는 Microsoft Excel의 해당 함수와 동일합니다.

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


Example

=MATCH(200;D1:D100)은 D열인 D1:D100 영역에서 200을 찾습니다. 이 값을 찾으면 해당 행 번호가 반환됩니다. 만약 이보다 높은 값을 찾게 되면 이전 행의 번호가 반환됩니다.

OFFSET

주어진 참조점에서 특정한 수의 행 및 열만큼 오프셋한 셀의 값을 구합니다.

This function is always recalculated whenever a recalculation occurs.

Syntax

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

참조는 함수가 새로운 참조값을 위해 검색할 위치에 대한 참조입니다.

행 수는 참조를 위쪽(음값), 혹은 아래쪽으로 수정하기 위한 행의 수입니다.

열 수는 참조를 위쪽(음값), 혹은 아래쪽으로 수정하기 위한 열의 수입니다.

높이는 새로운 참조 위치가 시작하는 영역의 수직 높이를 의미합니다.(선택 사항)

너비는 새로운 참조 위치가 시작하는 범위의 가로 너비를 의미합니다.(선택 사항)

인수는 0이나 음수로 시작하는 행이나 열을 낳으면 안됩니다.

높이너비는 0 이나 음수로 시작할 수 없습니다.

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.

Example

=OFFSET(A1;2;2)은 A1에서부터 두행 아래, 두열 오른쪽으로 이동한 셀인 C3 셀의 값을 참조해 돌려줍니다. 만일 C3 셀이 100 이란 값을 가지고 있다면 이 함수의 결과값도 100이 될 것입니다.

=OFFSET(B2:C3;1;1)은 B2:C3 에서 아래로 한 행, 오른쪽으로 한 열 이동한 C3:D4 에 대한 참조를 반환합니다.

=OFFSET(B2:C3;-1;-1) 는 B2:C3을 참조해 1행 위로, 1열 왼쪽으로 이동시킵니다.

=OFFSET(B2:C3;0;0;3;4)는 B2:C3에 대한 참조값을 B2:E4의 3행 4열로 크기를 조절해서 돌려줍니다.

=OFFSET(B2:C3;1;0;3;4)는 B2:C3 에서 아래쪽으로 한 행을 늘인 B3:E5 에 대한 참조를 반환합니다.

=SUM(OFFSET(A1;2;2;5;6))는 A1에서 아래로 2행, 오른쪽으로 2열 떨어진 C3 셀에서부터 세로 5행, 가로 6열 영역(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.

Syntax

ROW([Reference])

참조는 하나의 셀 또는 영역, 영역의 이름일 수 있습니다.

참조가 지정되지 않으면 수식이 입력되는 셀의 행 번호가 산출됩니다. LibreOffice Calc는 현재 셀에 대한 참조를 자동으로 설정합니다.

Example

=ROW(B3)은 테이블에서 세 행을 참조하므로 3을 값으로 반환합니다.

참조할 값이 5부터 8까지의 값을 가지는 행으로 지정되어 있기 때문에 {=ROW(D5:D8)}는 (5, 6, 7, 8)의 값을 가지는 단일 열 배열을 출력합니다.

ROW 함수는 배열을 입력받을 수 없기 때문에 =ROW(D5:D8)는 배열의 첫 행 숫자인 5를 결과로 반환하게 됩니다.

{=ROW(A1:E1)}=ROW(A1:E1)는 참조 범위가 모두 1행을 첫번째 열에 포함하고 있기 때문에 모두 1을 반환합니다. (단일행 범위는 하나의 행만을 범위로 가지고 있기 때문에 범위 수식을 입력하는 것에 대해서 차이점을 가지지 않습니다.)

=ROW()함수에 3번 행에 입력되었다면 3을 반환합니다.

{=ROW(토끼)}는 배열 (C1:D3)의 이름이 "토끼"라고 지정되어 있는 경우 단일열 배열 (1, 2, 3)을 반환합니다.

ROWS

참조 또는 배열에 있는 행 수를 구합니다.

Syntax

ROWS(배열)

배열은 지정된 행의 총 갯수를 가진 참조나 이름이 있는 영역입니다.

Example

=Rows(B5)은 하나의 셀은 하나의 행만 가지므로 1을 값으로 반환합니다.

=ROWS(A10:B12)는 3을 반환합니다.

=ROWS(Rabbit)는 "Rabbit"이 (C1:D3) 영역에 있을 경우, 3을 값으로 반환합니다.

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.

Syntax

SHEET([Reference])

참조는 선택할 수 있는 매개 변수이며, 하나의 셀 또는 영역, 시트 이름 문자열에 대한 참조입니다.

Example

=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

참조의 시트 수를 결정합니다. 매개 변수를 입력하지 않으면 현재 문서의 시트 수를 구합니다.

Syntax

SHEETS([Reference])

참조는 시트 또는 영역에 대한 참조입니다. 이 매개 변수는 선택 사항입니다.

Example

만일 문서 내에서 Sheet1, Sheet2, Sheet3이 이 순서대로 정렬되어 있을 경우=SHEETS(Sheet1.A1:Sheet3.G12)는 3을 반환합니다.

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


Syntax

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

인덱스는 반환값을 가진 배열의 열 번호입니다. 첫 열의 값은 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.

빈 셀 처리

Example

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.

B1에 아래의 수식을 삽입하십시오:

=VLOOKUP(A1;D1:E100;2)

A1에 번호를 입력하는 즉시, 참조 D1:E100의 두 번째 열에 있는 해당 텍스트가 B1에 표시됩니다. 없는 번호를 입력하면 그 다음으로 작은 번호가 있는 텍스트가 표시됩니다. 이를 원하지 않는다면 마지막 매개 변수로 FALSE를 수식에 입력하여 없는 번호를 입력할 때 오류 메시지가 출력되도록 합니다.

Please support us!