TRUNC is a worksheet function in Excel that allows you to truncate a number to a certain number of decimal places. It is useful when you want to round a number down to the nearest whole number or to a certain number of decimal places.
To use the TRUNC function, select the cell in which you want the result to appear and enter the following formula:
=TRUNC(number, num_digits)
where number
is the number that you want to truncate and num_digits
is the number of decimal places that you want to keep. For example, if number
is 12.345 and num_digits
is 2, the result will be 12.34.
You can also use the TRUNC function to round a number up or down to the nearest multiple of a certain number. To do this, enter a negative value for num_digits
. For example, if number
is 12.345 and num_digits
is -2, the result will be 12.35 (rounded up to the nearest multiple of 2).