TRUNC function in Excel

Excel Date and Time Functions return a dynamic date or time in a cell.

Extract date from a date and time in Excel

This tutorial show how to Extract date from a date and time in Excel using the example below. If you have dates with time values and you want to extract only the date portion, you can use a formula that uses the INT function. Note: Excel handles dates and time using a scheme in which… read more »

Excel Get integer part of a number Example

This tutorials shows how to Get integer part of a number  in Excel. To remove the decimal part of a number and return only the integer portion, you can use the TRUNC function to slice off the decimal. Formula =TRUNC(number) Explanation In the example, cell C6 contains this formula: =TRUNC(B6) The TRUNC function simply truncates… read more »

Excel Get decimal part of a number Example

This tutorials shows how to Get decimal part of a number in Excel. If you need to get just de the decimal part of a number, you can use a simple formula based on the TRUNC function. Formula =number-TRUNC(number) Explanation In the example, cell C6 contains this formula: =B6-TRUNC(B6) This formula uses the TRUNC function… read more »

Excel Data validation whole percentage only

Set criteria to allow whole percentage only without decimals. To allow only whole number percentages like 5%, 10% and not 5.5%, 10.25%, etc. you can use data validation with a custom formula based on the TRUNC function. Formula =TRUNC(A1*100)=(A1*100) Notes: Data validation rules are triggered when a user adds or changes a cell value. Cell references… read more »

Use of INT and TRUNC function in Excel

This example illustrates two functions to chop off decimals in Excel. The INT and the TRUNC function. Int The INT (Integer) function rounds a number down to the nearest integer. Conclusion: the INT function only chops off decimals from positive numbers. Trunc Truncate a number to a given precision. The TRUNC (Truncate) function always chops off decimals. The TRUNC function can keep… read more »

Sidebar