Excel TRUNC Function
Introduced in Excel 2007, TRUNC function is a
built-in excel function that can be used as a worksheet function. It is
categorized as Math and Trigonometry Function that does not round off the
number. It is advised to use TRUNC function to obtain the integer value of the
given decimal number.
For Example:=TRUNC(10.2) or =TRUNC(10.2,0) will
return 10, =TRUNC(10.2,1) will return 10.2
Syntax
=TRUNC(Number, Num_Digits)
Arguments
- Number. REQUIRED. Any positive or negative number that is required to truncate.
- Num_Digit. Optional. Could be a positive, negative digit, or zero. If this parameter is omitted, trunk function will assume 0.
-A positive value that is greater than zero
specifies the number of digits to the right of the decimal point.
-equal to zero (or left blank) specifies to truncate
to the nearest integer.
- A negative value less than zero specifies digits
to the left of the decimal point.
Purpose
To truncate a number to a given precision
Return Value
A truncated number
Remarks
- The function does not rounds off the number, just returns the output integer/ and non-integer depending upon the input.
- The difference between INT and TRUNC is that INT returns on integer value by rounding off to the nearest integer but Trunc does not rounds off the number and return the integer and non-integer output depending upon the input.
- TRUNC and INT are similar functions because they both return the integer part of a number. The difference is that TRUNC merely truncates a number, but INT rounds off a number. However, for positive numbers and when trunk uses 0 as the num_digit, both functions return the same value. With negative numbers, results will be different.
Source
- https://corporatefinanceinstitute.com/resources/excel/functions/trunc-function/
- https://support.office.com/en-us/article/trunc-function-8b86a64c-3127-43db-ba14-aa5ceb292721
- https://exceljet.net/excel-functions/excel-trunc-function
No comments:
Post a Comment