논리 함수

This category contains the Logical functions.

Handling non-logical arguments in logical functions

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

Insert - Function - Category Logical


ISNA

셀에 #N/A(사용할 수 없는 값) 오류 값이 포함되어 있으면 TRUE를 구합니다.

오류 상황에서 함수는 FALSE 값을 반환합니다.

Syntax

ISNA(Values)

Number는 검사할 숫자 또는 표현입니다.

Example

=ISNA(D3)은 결과값으로 FALSE를 돌려줍니다.

ISERROR

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


Syntax

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.

Example

C8 셀이 =1/0의 수식을 포함하는 경우, 이 수식은 불가능한 수식이므로 =ISERROR(C8)은 TRUE값을 반환합니다.

C8 셀이 =1/0의 수식을 포함하는 경우, 이 수식은 불가능한 수식이므로 =ISERROR(C8)은 TRUE값을 반환합니다.

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

모든 인수가 TRUE이면 TRUE를 구합니다. 요소 중 하나가 FALSE이면 이 함수는 FALSE 값을 구합니다.

인수는 논리 값을 구하는 논리식 자체(TRUE, 1<5, 2+3=7, B8<10)이거나 논리 값을 포함하는 배열 (A1:C3)입니다.

Syntax

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.


Example

12<13, 14>12 및 7<6 항목의 논리 값이 검사됩니다.

=AND(12<13;14>12;7<6)는 FALSE 값을 반환합니다.

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


FALSE

논리값 FALSE를 구합니다. FALSE() 함수는 인수가 필요하지 않으며 항상 논리값 FALSE를 구합니다.

Syntax

FALSE()

Example

=FALSE()는 FALSE를 반환합니다.

=NOT(FALSE())는 TRUE 값을 반환합니다.

IF

수행할 논리 검사를 지정합니다.

Syntax

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

테스트는 TRUE 또는 FALSE가 될 수 있는 임의 값 또는 식입니다.

참값은 조건문이 TRUE(참)일 때 셀에 반환할 값입니다(선택 사항).

거짓값은 조건문이 FALSE(거짓)일 때 셀에 반환할 값입니다(선택 사항).

In the LibreOfficeDev 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

=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

변환할 논리값을 채워넣으십시요.

Syntax

NOT(논리값)

논리값은 어떠한 값이라도 포함되어야 합니다.

Example

=NOT(A)은 수학에서의 역과 같습니다. A=TRUE(참)일 때 NOT(A)는 FALSE(거짓)로 평가됩니다.

OR

최소한 하나 이상의 인수가 TRUE이면 TRUE를 구합니다. 모든 인수가 논리값 FALSE를 가지면 FALSE 값을 구합니다

인수는 논리 값을 구하는 논리식 자체(TRUE, 1<5, 2+3=7, B8<10)이거나 논리 값을 포함하는 배열 (A1:C3)입니다.

Syntax

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.


Example

12<11; 13>22 및 45=45 항목의 논리 값이 검사됩니다.

=OR(12<11;13>22;45=45)는 TRUE 값을 반환합니다.

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


TRUE

논리 값은 TRUE로 설정됩니다. TRUE() 함수는 인수가 필요하지 않으며 항상 논리값 TRUE를 구합니다.

Syntax

TRUE()

Example

A=TRUE 및 B=FALSE이면 다음 예가 나타납니다.

=AND(A;B)는 FALSE를 반환합니다.

=OR(A;B)는 TRUE를 반환합니다.

=NOT(AND(A;B))는 TRUE 값을 반환합니다.

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


Syntax

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.

Example

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

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

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