Advanced-excel-functions-advanced-excel-math-trignometric-trunc-function
提供:Dev Guides
数学と三角法-TRUNC関数
説明
TRUNC関数は、数値の小数部分を削除して、数値を整数に切り捨てます。
構文
TRUNC (number, [num_digits])
引数
Argument | Description | Required/Optional |
---|---|---|
Number | The number you want to truncate. | Required |
Num_digits | A number specifying the precision of the truncation. The default value for num_digits is 0 (zero). | Optional |
ノート
- TRUNCとINTは、どちらも整数を返すという点で似ています
- TRUNCは、数値の小数部分を削除します
- INTは、数値の小数部の値に基づいて、数値を最も近い整数に切り捨てます
- INTとTRUNCは、負の数を使用する場合にのみ異なります。
- たとえば、TRUNC(-4.3)は-4を返しますが、INT(-4.3)は-5を返します。これは、-5の方が小さいためです。
適用範囲
Excel 2007、Excel 2010、Excel 2013、Excel 2016