Excel ROUNDDOWN Function
The Excel ROUNDDOWN function returns a number that is rounded down in accordance with the specified number of digits
Example: Excel ROUNDDOWN Function
=ROUNDDOWN(B5,2)
|
Result in cell D5 (5378.72) - returns a number rounded down to the right of the decimal point by two.
|
=ROUNDDOWN(B6,0)
|
Result in cell D6 (5378) - returns a number rounded down to the nearest integer.
|
=ROUNDDOWN(B7,-2)
|
Result in cell D7 (5300) - returns a number rounded down to the left of the decimal point by two.
|
METHOD 2. Excel ROUNDDOWN Function using links
EXCEL
=ROUNDDOWN(B5,C5)
|
Result in cell D5 (5378.72) - returns a number rounded down to the right of the decimal point by two.
|
=ROUNDDOWN(B6,C6)
|
Formula in cell D6 (Result: 5378) - returns a number rounded down to the nearest integer.
|
=ROUNDDOWN(B7,C7)
|
Formula in cell D7 (Result: 5300) - returns a number rounded down to the left of the decimal point by two.
|
METHOD 3. Excel ROUNDdDOWN function using the Excel built-in function library with hardcoded values
EXCEL
=ROUNDDOWN(B5,2) Note: in this example we are rounding down a number in cell (B5) to the right of the decimal point by two. |
METHOD 4. Excel ROUNDDOWN function using the Excel built-in function library with links
EXCEL
=ROUNDDOWN(B5,C5) Note: in this example we are rounding down a number in cell (B5) to the right of the decimal point by the amount in cell (C5). |
Dim ws As Worksheet
ws.Range("D5") = Application.WorksheetFunction.RoundDown(ws.Range("B5"), 2)
ws.Range("D6") = Application.WorksheetFunction.RoundDown(ws.Range("B6"), 0)
ws.Range("D7") = Application.WorksheetFunction.RoundDown(ws.Range("B7"), -2)
End Sub
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
Worksheet Name: Have a worksheet named ROUNDDOWN.
Value to Round: Ensure that the values that you want to round is captured in range ("B5:B7").
ADJUSTABLE PARAMETERS
Output Range: Select the output range by changing the cell references ("D5"), ("D6") and ("D7") in the VBA code to any cell in the worksheet, that doesn't conflict with formula.
Value to Round Down: Select the values that you want to round down by changing the range ("B5:B7") to any range in the worksheet that contains the values that you want to round down and doesn't conflict with the formula.
Dim ws As Worksheet
ws.Range("D5") = Application.WorksheetFunction.RoundDown(ws.Range("B5"), ws.Range("C5"))
ws.Range("D6") = Application.WorksheetFunction.RoundDown(ws.Range("B6"), ws.Range("C6"))
ws.Range("D7") = Application.WorksheetFunction.RoundDown(ws.Range("B7"), ws.Range("C7"))
End Sub
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
Worksheet Name: Have a worksheet named ROUNDDOWN.
Value to Round Down: Ensure that the value that you want to round down is captured in range ("B5:B7").
ADJUSTABLE PARAMETERS
Output Range: Select the output range by changing the cell references ("D5"), ("D6") and ("D7") in the VBA code to any cell in the worksheet, that doesn't conflict with formula.
Value to Round Down: Select the value that you want to round down by changing the range ("B5:B7") to any range in the worksheet that contains the values that you want to round down and doesn't conflict with the formula.
Number of Digits: Select the number of digits to which the specified number should be rounded down to by changing the range ("C5:C7") to any range that contains a value that represents the number of digits to which the specified number should be rounded down to.
The Excel ROUNDDOWN function returns a number that is rounded down in accordance with the specified number of digits. Therefore, the function will round down any number that is greater than 0 (1-9).
=ROUNDDOWN(number, num_digits)
number: (Required) The number that is to be rounded down.
num_digits: (Required) The number of digits that the specified number will be rounded down to.
ADDITIONAL NOTES
Note 1: The ROUNDDOWN function can round to the right or left of the decimal point.
Note 2: To round down to the right of the decimal point, enter a positive num_digits number.
Note 3: To round down to the left of the decimal point, enter a negative num_digits number.
Note 4: Using a 0 as the number_digits number, the ROUNDDOWN function will round down to the nearest integer.