TRUNC

忽略不重要的位數,將指定數字捨去到特定有效位數。

使用範本

TRUNC(3.141592654,2)

TRUNC(A2,0)

TRUNC(1.23)

語法

TRUNC(value, [places])

  • 要捨去部分位數的值。

  • 位數 - [ OPTIONAL - 0 by default ] - The number of significant digits to the right of the decimal point to retain.

    • IF 位數 is greater than the number of significant digits in , `value is returned without modification.

    • 位數 may be negative, in which case the specified number of digits to the left of the decimal place are changed to zero. All digits to the right of the decimal place are discarded. If all digits of are changed to zero, TRUNC simply returns 0.

附註

  • TRUNC performs no rounding, simply discarding unwanted digits.

另請參閱

ROUNDUP: 將指定數字四捨五入到特定小數位數,而且一律無條件進入到下一個有效的遞增量。

ROUNDDOWN: 將指定數字四捨五入到特定小數位數,而且一律無條件捨去到下一個有效的遞增量。

ROUND: 根據標準規則將指定數字四捨五入到特定的小數位數。

MROUND: 將數字四捨五入到另一個最接近的整數倍數。

INT: 將數字無條件捨去到小於或等於此數字的最接近整數。

FLOOR: 將數字無條件捨去到最接近的指定基數之整數倍數。

CEILING: 將數字無條件進入到最接近的指定基數之整數倍數。

範例

true
造訪學習中心

您有在公司或學校使用 Google 文件等 Google 產品嗎?快來試試實用的秘訣、教學課程和範本,瞭解如何在不安裝 Office 的情況下處理 Office 檔案、建立動態專案計劃和小組日曆、自動整理收件匣及進行其他作業。

搜尋
清除搜尋內容
關閉搜尋
主選單
4820268491607642219
true
搜尋說明中心
true
true
true
true
true
35
false
false