Mathematical Functions

此分類包含 Calc 的 Mathematical 函式。若要開啟 [函式精靈],請選擇 [插入] - [函式]

[text/scalc/01/func_aggregate.xhp#aggregate_head not found].

This function returns an aggregate result of the calculations in the range. You can use different aggregate functions listed below. The Aggregate function enables you to omit hidden rows, errors, SUBTOTAL and other AGGREGATE function results in the calculation.

RAWSUBTRACT

Subtracts a set of numbers and gives the result without eliminating small roundoff errors.

SUM

Adds a set of numbers.

HOUR

Return a numeric value calculated by a combination of three colors (red, green and blue) and the alpha channel, in the RGBA color system. The result depends on the color system used by your computer.

SUMIFS

Returns the sum of the values of cells in a range that meets multiple criteria in multiple ranges.

ABS

傳回數字的絕對值。

Syntax

ABS(number)

Number 是要計算其絕對值的數字。數字的絕對值是沒有 +/- 符號的數值。

Example

=ABS(-56) 傳回 56。

=ABS(12) 傳回 12。

=ABS(0) 傳回 0。

ACOS

傳回一個數字的反餘弦值。

Syntax

ACOS(number)

此函式傳回 Number 的反三角反弦值,亦即反弦值為 Number 的角度 (弧度)。傳回的角度介於 0 與 PI 之間。

若要得出角度,請使用 DEGREES 函式。

Example

=ACOS(-1) 傳回 3.14159265358979 (PI 弧度)。

=DEGREES(ACOS(0.5)) 傳回 60。60 度的餘弦值為 0.5。

Open file with example:

ACOSH

傳回一個數字的反雙曲餘弦值。

Syntax

ACOSH(number)

此函式傳回 Number 的反雙曲餘弦值,亦即雙曲餘弦值為 Number 的數字。

數字必須大於或等於 1。

Example

=ACOSH(1) 傳回 0。

=ACOSH(COSH(4)) 傳回 4。

Open file with example:

ACOT

得出指定數字的反餘切值。

Syntax

ACOT(number)

此函式傳回 Number 的反三角餘切值,亦即餘切值為 Number 的角度 (弧度)。傳回的角度介於 0 與 PI 之間。

若要得出角度,請使用 DEGREES 函式。

Example

=ACOT(1) 傳回 0.785398163397448 (PI/4 弧度)。

=DEGREES(ACOT(1)) 傳回 45。45 度的正切值為 1。

Open file with example:

ACOTH

傳回指定數字的反餘切雙曲線。

Syntax

ACOTH(number)

此函式傳回 Number 的反雙曲餘切值,亦即雙曲餘切值為該數目的數字。

若 Number 介於 -1 與 1 之間,則會發生錯誤。

Example

=ACOTH(1.1) 傳回 1.1 的反雙曲餘切近似值 1.52226。

Open file with example:

ASIN

傳回一個數字的反正弦值。

Syntax

ASIN(Number)

此函式傳回 Number 的反三角正弦值,亦即正弦值為 Number 的角度 (弧度)。傳回的角度介於 -PI/2 與 +PI/2 之間。

若要得出角度,請使用 DEGREES 函式。

Example

=ASIN(0) 傳回 0。

=ASIN(1) 傳回 1.5707963267949 (PI/2 弧度)。

=DEGREES(ASIN(0.5)) 傳回 30。30 度的正弦值為 0.5。

Open file with example:

ASINH

傳回一個數字的反雙曲正弦值。

Syntax

ASINH(number)

此函式傳回 Number 的反雙曲正弦值,亦即雙曲正弦值為 Number 的數字。

Example

=ASINH(-90) 傳回近似值 -5.1929877。

=ASINH(SINH(4)) 傳回 4。

Open file with example:

ATAN

傳回一個數字的反正切值。

Syntax

ATAN(number)

此函式傳回 Number 的反三角正切值,亦即正切值為 Number 的角度 (弧度)。傳回的角度介於 -PI/2 與 PI/2 之間。

若要得出角度,請使用 DEGREES 函式。

Example

=ATAN(1) 傳回 0.785398163397448 (PI/4 弧度)。

=DEGREES(ATAN(1)) 傳回 45。45 度的正切值為 1。

Open file with example:

ATAN2

Returns the angle (in radians) between the x-axis and a line from the origin to the point (NumberX|NumberY).

note

This function is part of the Open Document Format for Office Applications (OpenDocument) standard Version 1.2. (ISO/IEC 26300:2-2015)


Syntax

ATAN2(NumberX; NumberY)

NumberX is the value of the x coordinate.

NumberY 是 Y 座標的數值。

tip

Programming languages have usually the opposite order of arguments for their atan2() function.


ATAN2 returns the angle (in radians) between the x-axis and a line from the origin to the point (NumberX|NumberY)

Example

=ATAN2(-5;9) returns 2.07789 radians.

To get the angle in degrees apply the DEGREES function to the result.

=DEGREES(ATAN2(12.3;12.3)) returns 45. The tangent of 45 degrees is 1.

note

LibreOffice results 0 for ATAN2(0;0).


The function can be used in converting cartesian coordinates to polar coordinates.

=DEGREES(ATAN2(-8;5)) returns φ = 147.9 degrees

Cartesian coordinates to polar coordinates example

Open file with example:

ATANH

傳回一個數字的反雙曲正切值。

Syntax

ATANH(number)

此函式傳回 Number 的反雙曲正切值,亦即雙曲正切值為 Number 的數字。

數字必須遵守條件:-1 < 數字 < 1。

Example

=ATANH(0) 傳回 0。

Open file with example:

COMBIN

傳回元素的組合數,不包含重複項目。

Syntax

COMBIN(Count1; Count2)

Count1 是資料集中的項目數。

Count2 是從資料集中選擇的項目數。

COMBIN 會得出選擇這些項目的順序方法數目。例如,若在集合中有 3 個項目 A、B 和 C,您可用 3 種不同的方法選擇 2 個項目,亦即 AB、AC 和 BC。

COMBIN 執行公式:Count1!/(Count2!*(Count1-Count2)!)

Example

=COMBIN(3;2) 傳回 3。

COMBINA

傳回項目子集合的組合數,包含重複項目。

Syntax

COMBINA(Count1; Count2)

Count1 是資料集中的項目數。

Count2 是從資料集中選擇的項目數。

COMBINA 會得出選擇這些項目的唯一方法數目,而選擇的順序並不相關,且允許項目重複。例如,若在集合中有 3 個項目 A、B 和 C,您可用 6 種不同的方法選擇 2 個項目,亦即 AA、AB、AC、BB、BC 及 CC。

COMBINA 會執行公式:(Count1+Count2-1)! / (Count2!(Count1-1)!)

Example

=COMBINA(3;2) 傳回 6。

CONVERT_OOO

Converts to euros a currency value expressed in one of the legacy currencies of 19 member states of the Eurozone, and vice versa. The conversion uses the fixed exchange rates at which the legacy currencies entered the euro.

tip

We recommend using the more flexible EUROCONVERT function for converting between these currencies. CONVERT_OOO is not a standardized function and is not portable.


Syntax

CONVERT_OOO(Value; "Text1"; "Text2")

Value is the amount of the currency to be converted.

Text1 is a three-character string that specifies the currency to be converted from.

Text2 is a three-character string that specifies the currency to be converted to.

Text1 and Text2 must each take one of the following values: "ATS", "BEF", "CYP", "DEM", "EEK", "ESP", "EUR", "FIM", "FRF", "GRD", "IEP", "ITL", "LTL", "LUF", "LVL", "MTL", "NLG", "PTE", "SIT", and "SKK".

One, and only one, of Text1 or Text2 must be equal to "EUR".

Example

=CONVERT_OOO(100;"ATS";"EUR") returns the euro value of 100 Austrian schillings.

=CONVERT_OOO(100;"EUR";"DEM") converts 100 euros into German marks.

tip

Refer to the CONVERT_OOO wiki page for more details about this function.


COS

得出指定角度 (弧度) 的餘弦值。

Syntax

COS(number)

傳回 Number 的 (三角) 餘弦值,用弧度表示角度。

若要以角度得出餘弦值,請使用 RADIANS 函式。

Example

=COS(PI()/2) 傳回 0,PI/2 弧度的餘弦值。

=COS(RADIANS(60)) 傳回 0.5,60 度的餘弦值。

Open file with example:

COSH

傳回一個數字的雙曲餘弦值。

Syntax

COSH(number)

得出 Number 的雙曲餘弦值。

Example

=COSH(0) 傳回 1,0 的雙曲餘弦值。

Open file with example:

COT

得出指定角度 (弧度) 的餘切值。

Syntax

COT(number)

得出 Number 的 (三角) 餘切值,此為弧度角度。

若要以角度得出餘切值,請使用 RADIANS 函式。

某個角度的餘切值相當於 1 除以該角度的正切值。

範例:

=COT(PI()/4) 傳回 1,PI/4 弧度的餘切值。

=COT(RADIANS(45)) 傳回 1,45 度的餘切值。

Open file with example:

COTH

傳回指定數字 (角度) 的雙曲餘切值。

Syntax

COTH(number)

傳回 Number 的雙曲餘切值。

Example

=COTH(1) 傳回 1 的雙曲餘切近似值 1.3130。

Open file with example:

CSC

回傳給定角度 (單位:弧度) 的餘割值。角度的餘割值等於 1 除以該角度的正弦值。

tip

This function is available since LibreOffice 3.5.


Syntax

COS(Number)

回傳 Number 的 (三角) 餘割,角度為弧度。

若要以度為單位回傳餘割值,請使用 RADIANS 函式。

Example

=CSC(PI()/4) 回傳大約 1.4142135624,即 PI/4 弧度正弦值的倒數。

=CSC(RADIANS(30)) 回傳 2,即 30 度的餘割值。

Open file with example:

CSCH

回傳數字的雙曲餘割值。

tip

This function is available since LibreOffice 3.5.


Syntax

CSCH(Number)

回傳 Number 的雙曲餘割值。

Example

=CSCH(1) 回傳值大約為 0.8509181282,即 1 的雙曲餘割值。

Open file with example:

DEGREES

將弧度轉換為角度。

Syntax

DEGREES(Number)

Number 是要轉換為度數的角度 (弧度)。

Example

=DEGREES(PI()) 傳回 180 度。

EVEN

將正數向上捨入成最接近的偶數,將負數向下捨入成最接近的偶數。

Syntax

EVEN(Number)

傳回 (向著背離零的雙整數方向) 向上捨入為下一個偶數整數的 Number

Example

=EVEN(2.3) 傳回 4。

=EVEN(2) 傳回 2。

=EVEN(0) 傳回 0。

=EVEN(-0.5) 傳回 -2。

EXP

Returns e raised to the power of a number. The constant e has a value of approximately 2.71828182845904.

Syntax

EXP(Number)

Number 是以 e 為底數的乘冪。

Example

=EXP(1) returns 2.71828182845904, the mathematical constant e to Calc's accuracy.

FACT

得出一個數的階乘。

Syntax

FACT(Number)

得出 Number!,此為 Number 的階乘,計算方式為 1*2*3*4* ... * Number。

=FACT(0) 按定義會傳回 1。

負數的階乘傳回「無效的引數」錯誤。

Example

=FACT(3) 傳回 6。

=FACT(0) 傳回 1。

GCD

傳回兩個或多個整數的最大公約數。

最大公約數是可整除各指定整數的最大正整數。

Syntax

GCD(Integer 1 [; Integer 2 [; … [; Integer 255]]])

Integer 1, Integer 2, … , Integer 255 are integers, references to cells or to cell ranges of integers.

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

=GCD(16;32;24) 得出結果為 8,因為 8 是 16、24 與 32 的最大公約數。

=GCD(B1:B3) 其中儲存格 B1、B2、B3 分別包含 9129 得出 3。

GCD_EXCEL2003

The result is the greatest common divisor of a list of numbers.

note

The functions whose names end with _ADD or _EXCEL2003 return the same results as the corresponding Microsoft Excel 2003 functions without the suffix. Use the functions without suffix to get results based on international standards.


Syntax

GCD_EXCEL2003(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers.

Example

=GCD_EXCEL2003(5;15;25) returns 5.

INT

將數字向下捨入為最接近的整數。

Syntax

INT(Number)

傳回 Number 向下捨入為最接近的整數。

負數會向下捨入至以下的整數。

Example

=INT(5.7) 傳回 5。

=INT(-1.3) 傳回 -2。

LCM

傳回一個或多個整數的最小公倍數。

Syntax

LCM(Integer 1 [; Integer 2 [; … [; Integer 255]]])

Integer 1, Integer 2, … , Integer 255 are integers, references to cells or to cell ranges of integers.

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

If you enter the numbers 512; 1024 and 2000 as Integer 1;2 and 3, then 128000 will be returned.

LCM_EXCEL2003

The result is the lowest common multiple of a list of numbers.

note

The functions whose names end with _ADD or _EXCEL2003 return the same results as the corresponding Microsoft Excel 2003 functions without the suffix. Use the functions without suffix to get results based on international standards.


Syntax

LCM_EXCEL2003(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers.

Example

=LCM_EXCEL2003(5;15;25) returns 75.

LN

傳回數字底數為常數 e 的自然對數值。常數 e 的近似值為 2.71828182845904。

Syntax

LN(Number)

Number 是要計算自然對數的值。

Example

=LN(3) 傳回 3 的自然對數 (近似值為 1.0986)。

=LN(EXP(321)) 傳回 321。

LOG

傳回指定底數的數字之對數。

Syntax

LOG(Number [; Base])

Number 是要計算其對數的數值。

Base (選擇性) 為對數計算的基數。若省略,則假設為基數為 10。

Example

=LOG(10;3) 傳回基數為 3 的 10 的對數 (近似值為 2.0959)。

=LOG(7^4;7) 傳回 4。

LOG10

傳回數字底數為 10 的對數值。

Syntax

LOG10(Number)

傳回 Number 的對數 (基底為 10)。

Example

=LOG10(5) 傳回基數為 10 的 5 的對數 (近似值為 0.69897)。

MOD

得出某一整數除以另一整數時的餘數。

Syntax

MOD(Dividend; Divisor)

若是整數引數,此函式會傳回被除數除以除數的餘數,亦即Dividend 除以 Divisor 的餘數。

此函式的執行方式為 Dividend - Divisor * INT(Dividend/Divisor),若引數不是整數,則此公式可得出結果。

Example

=MOD(22;3) 傳回 1,22 除以 3 的餘數。

=MOD(11.25;2.5) 傳回 1.25。

MROUND

得出四捨五入後最接近其他數字的倍數之數字。

Syntax

MROUND(Number; Multiple)

得出四捨五入為 Multiple 最接近的倍數之 Number

其他運算方式包括 Multiple * ROUND(Number/Multiple)

Example

=MROUND(15.5;3) 傳回 15,因為比起 18 (= 3*6),15.5 更接近 15 (= 3*5)。

=MROUND(1.4;0.5) 傳回 1.5 (= 0.5*3)。

MULTINOMIAL

Returns the factorial of the sum of the arguments divided by the product of the factorials of the arguments.

Syntax

MULTINOMIAL(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers.

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

若 F11 到 H11 包含值 234,則 =MULTINOMIAL(F11:H11) 傳回 1260。對應的公式為 =(2+3+4)! / (2!*3!*4!)。

ODD

將正數向上捨入成最接近的奇數,將負數向下捨入成最接近的奇數。

Syntax

ODD(Number)

傳回 (向著背離零的奇整數方向) 向上捨入為下一個奇數整數的 Number

Example

=ODD(1.2) 傳回 3。

=ODD(1) 傳回 1。

=ODD(0) 傳回 1。

=ODD(-3.1) 傳回 -5。

PI

傳回 3.14159265358979 (數學常數 PI 的值至 14 位小數點位數)。

Syntax

PI()

Example

=PI() 傳回 3.14159265358979。

POWER

得出乘冪之後的數字。

Syntax

POWER(基數; 指數)

傳回基數指數次方。

使用乘冪運算子 ^ 可能得到相同的結果:

基數^指數

note

=POWER(0,0) returns 1.


Example

=POWER(4;3) 傳回 64,表示 4 的 3 次方。

=4^3 也傳回 4 的 3 次方。

PRODUCT

將作為引數指定的所有數字相乘並傳回乘積。

Syntax

PRODUCT(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers.

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

=PRODUCT(2;3;4) 傳回 24。

QUOTIENT

得出除法運算的整數部分。

Syntax

QUOTIENT(Numerator; Denominator)

傳回 Numerator 除以 Denominator 的整數部分。

QUOTIENT is equivalent to INT(numerator/denominator) for same-sign numerator and denominator, except that it may report errors with different error codes. More generally, it is equivalent to INT(numerator/denominator/SIGN(numerator/denominator))*SIGN(numerator/denominator).

Example

=QUOTIENT(11;3) 傳回 3。捨去餘數 2。

RADIANS

將度轉換為弧度。

Syntax

RADIANS(Number)

Number 是指要轉換為弧度的角度度數。

Example

=RADIANS(90) 傳回 1.5707963267949,此為接近 Calc 精準度的 PI/2。

RAND

傳回 0 到 1 之間的隨機數。

This function is always recalculated whenever a recalculation occurs.

Syntax

RAND( )

This function produces a new random number each time Calc recalculates. To force Calc to recalculate manually press F9.

To generate random numbers which never recalculate, either:

Example

=RAND() 傳回介於 0 與 1 之間的隨機數。

RAND.NV

Returns a non-volatile random number between 0 and 1.

Syntax

RAND.NV()

This function produces a non-volatile random number on input. A non-volatile function is not recalculated at new input events. The function does not recalculate when pressing F9, except when the cursor is on the cell containing the function or using the Recalculate Hard command (Shift++F9). The function is recalculated when opening the file.

Example

=RAND.NV() returns a non-volatile random number between 0 and 1.

Technical information

tip

This function is available since LibreOffice 7.0.


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.LIBREOFFICE.RAND.NV

RANDBETWEEN

得出指定範圍內的隨機整數。

This function is always recalculated whenever a recalculation occurs.

Syntax

RANDBETWEEN(Bottom; Top)

傳回介於 BottomTop (包含兩者) 整數之間的隨機整數。

This function produces a new random number each time Calc recalculates. To force Calc to recalculate manually press F9.

若要產生從未重複計算的隨機數,請複製包含此函式的儲存格,然後使用 [編輯] - [選擇性貼上] (不核取 [全部插入][公式] 但核取 [數字])。

Example

=RANDBETWEEN(20;30) 傳回介於 20 與 30 之間的整數。

RANDBETWEEN.NV

Returns an non-volatile integer random number in a specified range.

Syntax

RANDBETWEEN.NV(Bottom; Top)

Returns an non-volatile integer random number between integers Bottom and Top (both inclusive). A non-volatile function is not recalculated at new input events or pressing F9. However, the function is recalculated when pressing F9 with the cursor on the cell containing the function, when opening the file, when using the Recalculate Hard command (Shift++F9) and when Top or Bottom are recalculated.

Example

=RANDBETWEEN.NV(20;30) returns a non-volatile integer between 20 and 30.

=RANDBETWEEN.NV(A1;30) returns a non-volatile integer between the value of cell A1 and 30. The function is recalculated when the contents of cell A1 change.

Technical information

tip

This function is available since LibreOffice 7.0.


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.LIBREOFFICE.RANDBETWEEN.NV

ROUND

將一個數四捨五入為一定小數點位數的數字。

Syntax

ROUND(Number [; Count])

傳回捨入到 Count 個小數點位數的 Number。若 Count 省略或為零,函式會捨入為最接近的整數。若 Count 為負值,則函式會捨入為最接近的 10、100、1000 等。

此函式會四捨五入至最接近的數字。另可使用 ROUNDDOWN 和 ROUNDUP。

Example

=ROUND(2.348;2) 傳回 2.35。

=ROUND(-32.4834;3) 傳回 -32.483。變更儲存格格式可檢視所有小數。

=ROUND(2.348;0) 傳回 2。

=ROUND(2.5) 傳回 3。

=ROUND(987.65;-2) 傳回 1000。

ROUNDDOWN

Truncates a number while keeping a specified number of decimal digits.

ROUNDUP

按指定位數向上 (沿絕對值增大的方向) 捨入數字。

Syntax

ROUNDUP(Number [; Count])

傳回 (背離零) 向上捨入到 Count 個小數點位數的 Number。若 Count 省略或為零,函式會向上捨入為整數。若 Count 為負值,函式會向上捨入到下一個 10、100、1000 等。

此函式沿絕對值增大的方向四捨五入。另可使用 ROUNDDOWN 和 ROUND。

Example

=ROUNDUP(1.1111;2) 傳回 1.12。

=ROUNDUP(1.2345;1) 傳回 1.3。

=ROUNDUP(45.67;0) 傳回 46。

=ROUNDUP(-45.67) 傳回 -46。

=ROUNDUP(987.65;-2) 傳回 1000。

SEC

回傳給定角度 (單位:弧度) 的正割值。角度的正割值等於 1 除以該角度的餘弦值

tip

This function is available since LibreOffice 3.5.


Syntax

SEC(Number)

回傳角度 Number 的 (三角) 正割值,用弧度表示角度。

若要以角度為單位回傳正割值,請使用 RADIANS 函式。

Example

=SEC(PI()/4) 回傳值大約為 1.4142135624,即 PI/4 弧度餘弦值的倒數。

=SEC(RADIANS(60)) 回傳 2,即 60 度角的正割值。

Open file with example:

SECH

還傳一個數的雙曲正割值。

tip

This function is available since LibreOffice 3.5.


Syntax

SECH(Number)

傳回 Number 的雙曲正割值。

Example

=SECH(0) 回傳 1,即 0 的雙曲正割值。

Open file with example:

SERIESSUM

計算第一次乘冪級數的總和。

SERIESSUM(x;n;m;c) = c1xn + c2xn+m + c3xn+2m + ... + cixn + (i-1)m.

Syntax

SERIESSUM(X; N; M; Coefficients)

X 是指乘冪級數的輸入值。

N 是指初始乘冪。

M 是指增加 N 的增量

Coefficients 是指係數序列。每加入一個係數,序列總和會擴展一部分。

Example

=SERIESSUM(A1; 0; 1; {1; 2; 3}) calculates the value of 1+2x+3x2, where x is the value in cell A1. If A1 contains 1, the formula returns 6; if A1 contains 2, the formula returns 17; if A1 contains 3, the formula returns 34; and so on.

tip

Refer to the SERIESSUM wiki page for more details about this function.


SIGN

傳回一個數字的正負符號。如果數字為正值,則傳回 1;如果為負值,則傳回 -1;如果為零,則傳回 0。

Syntax

SIGN(Number)

Number 是要決定其正負符號的數字。

Example

=SIGN(3.4) 傳回 1。

=SIGN(-4.5) 傳回 -1。

SIN

得出指定角度 (弧度) 的正弦值。

Syntax

SIN(Number)

傳回 Number 的 (三角) 正弦值,此為弧度的角度。

若要以角度得出正弦值,請使用 RADIANS 函式。

Example

=SIN(PI()/2) 傳回 1,PI/2 弧度的正弦值。

=SIN(RADIANS(30)) 傳回 0.5,30 度的正弦值。

Open file with example:

SINH

傳回一個數字的雙曲正弦值。

Syntax

SINH(Number)

傳回 Number 的雙曲正弦值。

Example

=SINH(0) 傳回 0,0 的雙曲正弦值。

Open file with example:

SQRT

得出一個數的正平方根。

Syntax

SQRT(Number)

傳回 Number 的正平方根。

Number 必須是負數。

Example

=SQRT(16) 傳回 4。

=SQRT(-16) 傳回一個引數無效錯誤。

SQRTPI

得出 (PI 乘以一個數) 的平方根。

Syntax

SQRTPI(number)

傳回 (PI 乘以 Number) 的正平方根。

這等於 SQRT(PI()*Number)

Example

=SQRTPI(2) 傳回 (2PI) 的平方根,近似值為 2.506628。

SUBTOTAL

計算小計。 如果一個範圍已包含小計,則其不能用於進一步計算。將此函式和 [自動篩選] 同時使用,以僅對篩選出的資料條目進行計算。

Syntax

SUBTOTAL(Function; Range)

Function 是指代表下列其中一個函式的數值:

函式索引

(includes hidden values)

Function index

(ignores hidden values)

函式

1

101

AVERAGE

2

102

COUNT

3

103

COUNTA

4

104

MAX

5

105

MIN

6

106

PRODUCT

7

107

STDEV

8

108

STDEVP

9

109

SUM

10

110

VAR

11

111

VARP


Use numbers 1-11 to include manually hidden rows or 101-111 to exclude them; filtered-out cells are always excluded.

Range 是要加入其儲存格的範圍。

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

You have a table in the cell range A1:B6 containing a bill of material for 10 students. Row 2 (Pen) is manually hidden. You want to see the sum of the figures that are displayed; that is, just the subtotal for the filtered rows. In this case the correct formula would be:

A

B

1

ITEM

QUANTITY

2

Pen

10

3

Pencil

10

4

Notebook

10

5

Rubber

10

6

Sharpener

10


=SUBTOTAL(9;B2:B6) returns 50.

=SUBTOTAL(109;B2:B6) returns 40.

SUMIF

Adds the cells specified by a given criterion. This function is used to sum a range when you search for a certain value.

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

SUMIF(Range; Criterion [; SumRange])

Range is the range to which the criterion is to be applied.

Criterion: A criterion is a single cell Reference, Number or Text. It is used in comparisons with cell contents.

A reference to an empty cell is interpreted as the numeric value 0.

A matching expression can be:

SumRange 是加總值的範圍。若尚未指定此參數,則會加總「範圍」中找到的值。

note

SUMIF supports the reference concatenation operator (~) only in the Range parameter, and only if the optional SumRange parameter is not given.


Example

僅加總負數:=SUMIF(A1:A10;"<0")

=SUMIF(A1:A10;">0";B1:B10) - sums values from the range B1:B10 only if the corresponding values in the range A1:A10 are >0.

請參閱 COUNTIF() 以取得更多可與 SUMIF() 一起使用的語法範例。

SUMSQ

Calculates the sum of the squares of a set of numbers.

Syntax

SUMSQ(Number 1 [; Number 2 [; … [; Number 255]]])

Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers.

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

If you enter the numbers 2; 3 and 4 in the Number 1; 2 and 3 arguments, 29 is returned as the result.

TAN

得出指定角度 (弧度) 的正切值。

Syntax

TAN(Number)

傳回 Number 的 (三角) 正切值,此為弧度的角度。

若要以角度得出正切值,請使用 RADIANS 函式。

Example

=TAN(PI()/4) 傳回 1,PI/4 弧度的正切值。

=TAN(RADIANS(45)) 傳回 1,45 度的正切值。

Open file with example:

TANH

傳回一個數字的雙曲正切值。

Syntax

TANH(Number)

傳回 Number 的雙曲正切值。

Example

=TANH(0) 傳回 0,0 的雙曲正切值。

Open file with example:

TRUNC

Truncates a number while keeping a specified number of decimal digits.

歐元轉換

將舊的歐洲國家貨幣轉換成歐元,或從歐元轉換成舊的歐洲國家貨幣。

Syntax

EUROCONVERT(Value; "From_currency"; "To_currency" [; full_precision [; triangulation_precision]])

Value 是指要轉換的貨幣金額。

From_currencyTo_currency 分別是轉換的來源與目標貨幣單位。這些項目必須是文字,代表貨幣的正式縮寫 (例如「EUR」)。匯率 (以每歐元表示) 由歐盟執行委員會 (European Commission) 設定。

Full_precision 為選用項目。若省略或為 False,則結果會依據「目標」貨幣的小數點四捨五入。若 Full_precision 為 True,則結果不會四捨五入。

Triangulation_precision 為選用項目。若提供 Triangulation_precision 且 >=3,則三角轉換的中間結果 (currency1,EUR,currency2) 會四捨五入為該精度。若省略 Triangulation_precision,則中間結果不會四捨五入。此外,若「目標貨幣」為「歐元」,則就像需要三角測量一樣會使用 Triangulation_precision,同時套用從歐元轉換為歐元。

範例

=EUROCONVERT(100;"ATS";"EUR") 可將 100 奧地利先令轉換成歐元。

=EUROCONVERT(100;"EUR";"DEM") 可將 100 歐元轉換成德國馬克。

Please support us!