說明
Use this function to round a number down towards zero. Supported in Chains.
ROUNDDOWN is useful for controlling the precision of numerical data in calculations and display.
語法
ROUNDDOWN(number, num_digits)
Inputs
This function accepts the following arguments:
名稱 | 必要 | 說明 | Valid input |
---|---|---|---|
數字 |
是 | The number you want to round down. | A number, a reference to a cell containing a number, or a formula which results in either of these. |
num_digits |
是 | The number of digits to which you want to round the number down. | A positive integer, a reference to a cell containing a positive integer, or a formula which results in either of these. |
範例
範例資料
A | B |
---|---|
3.14159 | 1234.5678 |
-2.9876 | 0.0005 |
10.5 | 99.99 |
Fred | 3/11/2022 |
Sample formulas
公式 | 說明 | 結果 |
---|---|---|
=ROUNDDOWN(A1, 2) |
Rounds 3.14159 down to 2 decimal places. | 3.14 |
=ROUNDDOWN(B1, -2) |
Rounds 1234.5678 down to the nearest hundred. | 1200 |
=ROUNDDOWN(A2, 1) |
Rounds -2.9876 down to 1 decimal place. | -2.9 |
=ROUNDDOWN(B2, 3) |
Rounds 0.0005 down to 3 decimal places. | 0.000 |
=ROUNDDOWN(A3, 0) |
Rounds 10.5 down to the nearest whole number. | 10 |
=ROUNDDOWN(A4, 0) |
Attempts to round cell A4 to the nearest whole number. This fails because it is text. | #VALUE! |
附註
- If ROUNDDOWN is applied to text, it will result in a #VALUE! error.
- ROUNDDOWN is different from formatting a cell to display a certain number of decimal places, as it actually changes the value stored in the cell by removing all digits to the right of the last digit rounded.
- ROUNDDOWN differs from the ROUND and ROUNDUP functions in the following ways:
- ROUNDDOWN always rounds towards zero, regardless of whether the number is positive or negative.
- If
num_digits
is greater than 0, ROUNDDOWN rounds down to the specified number of decimal places. - If
num_digits
is 0, ROUNDDOWN rounds down to the nearest integer. - If
num_digits
is negative, ROUNDDOWN rounds down the digits to the left of the decimal point
- If
- ROUNDUP always rounds away from zero.
- ROUND follows standard rounding rules: if the digit to the right of the rounding position is 5 or greater, it rounds up; otherwise, it rounds down.
- Applying ROUND to a positive number will increase it in a positive direction, applying ROUND to a negative number will increase it in a negative direction.
- ROUNDDOWN always rounds towards zero, regardless of whether the number is positive or negative.
提示
- Use ROUNDDOWN when you need to ensure that numbers are always rounded down, regardless of their value.
- For displaying numbers with a certain number of decimal places without changing the underlying value, use cell formatting instead of ROUNDDOWN.
- You can combine ROUNDDOWN with other functions such as SUM or AVERAGE to control the precision of complex calculations.
- Be aware of potential rounding errors in financial calculations where high precision is required.
- Consider using the other rounding functions (linked in Related functions) if you need to round numbers in a different manner.