TRUNC Function: How to remove decimals and shorten numeric values

There are different ways in Excel to remove decimals and shorten numeric values. In this article, Quantrimang.com will explain how to use the TRUNC function and point out what makes it different from other techniques.

What is the TRUNC function?

The TRUNC function is a Mathematical and Trigonometric function in Excel, which helps to remove the fractional part of a number, or in other words, round the decimal number to an integer. It was first introduced in MS Excel 2007.

How to use the TRUNC function

Let's look at some TRUNC function examples with some sample data. The example below uses the following TRUNC function.

=TRUNC(A2)

If you do not specify how many digits to truncate, all decimal places will be discarded.

TRUNC Function: How to remove decimals and shorten numeric values
If you do not specify how many digits to truncate, all decimal places will be discarded.

You can see with the value in cell A2 that the TRUNC function does not apply any rounding. It simply truncates to 411.

Let's look at another example. This time the example will reduce the values ​​to two decimal places.

=TRUNC(A2,2)

TRUNC Function: How to remove decimals and shorten numeric values
Reduce values ​​to two decimal places

The TRUNC function will not display extra decimals if you ask it to display more than you have.

Take the following example and truncate it to 2 decimal places.

=TRUNC(A2,2)

TRUNC Function: How to remove decimals and shorten numeric values
The value in cell A4 is reduced to 2 decimal places.

The value in cell A4 is reduced to 2 decimal places, but the values ​​in A2 and A3 remain the same because they have less than two decimal places.

If you want to display two decimals, the cells will need to be formatted to force them to display.

Remove time of day and timestamp

A useful example of TRUNC is removing the time portion from dates and timestamps in Excel.

Imagine you have the following date and timestamp, but you only want the date part in the column for analysis.

TRUNC Function: How to remove decimals and shorten numeric values
Remove time part from date and timestamp in Excel

The following formula will remove the time part.

=TRUNC(A2)

TRUNC Function: How to remove decimals and shorten numeric values
The time part has been removed.

Even though the time portion has been removed, the resulting cells will still need to be formatted as dates.

Use TRUNC to shorten numbers

This is a rare technique. When you use a negative number, the function will truncate the numbers to the left of the decimal point. However, it does not change the number of digits, but replaces them with zeros.

Look at the following example.

=TRUNC(A2,-1)

TRUNC Function: How to remove decimals and shorten numeric values
Use TRUNC to shorten numbers

You can see in each example that a 0 is used to replace the number removed to the left of the decimal point.

There are many ways to remove decimal places, however, most of these will round the number in Excel . The beauty of the TRUNC function is that it does not round the values ​​and simply shortens them to the specified number of decimal places.

Refer to more articles about good Excel functions here .

Sign up and earn $1000 a day ⋙

Leave a Comment

Why Checkbox is an underutilized Excel feature?

Why Checkbox is an underutilized Excel feature?

On the surface, Excel Checkboxes seem like a very simple feature - which is probably why they are often overlooked.

Why Excel is the only project management tool you need?

Why Excel is the only project management tool you need?

Many people have tried many project management tools, but still come back to Excel for project management. While it may not be perfect for everyone, it is a simple, yet effective solution that you already know how to use.

Microsoft allows users to use Office applications on Windows for free, but with some limitations.

Microsoft allows users to use Office applications on Windows for free, but with some limitations.

Microsoft recently raised the price of its Microsoft 365 subscription, justifying the change by adding more AI experiences to the service.

SUBTOTAL Function: Calculates the total value of a filtered list in Excel

SUBTOTAL Function: Calculates the total value of a filtered list in Excel

The sum function when filtering data is very important for Microsoft Excel users. This article will summarize for you how to filter and calculate sum in Excel using Subtotal.

How to Export Airtable to Excel and Google Sheets

How to Export Airtable to Excel and Google Sheets

Airtable lets you create and share relational databases easily. Export your Airtable data to Google Sheets or Excel to enjoy the benefits of advanced charts and data visualization.

Effective ways to use ChatGPT in Excel

Effective ways to use ChatGPT in Excel

Curious about how ChatGPT can enhance your Excel experience? Here are some tips for using ChatGPT in Excel.

How to use the WORKDAY function in Microsoft Excel

How to use the WORKDAY function in Microsoft Excel

In Microsoft Excel, the WORKDAY function is a date and time function and its purpose is to return the date before and after the specified number of working days. Working days do not include weekends or any days defined as holidays.

Why are so many people stopping using Google Sheets and going back to Excel?

Why are so many people stopping using Google Sheets and going back to Excel?

For a while, Google Sheets lured people away from Excel. But many people came back after realizing that Google Sheets is far from beating Excel.

How to use the TREND function in Excel

How to use the TREND function in Excel

You can calculate and visualize trends in Excel using the TREND function. Here's how to use the TREND function in Microsoft Excel.

How to enable and disable macros on Excel

How to enable and disable macros on Excel

The following article will guide readers how to enable and disable macros in Excel 2007, 2010, 2013 and 2016.

How to fix the error of printing blank pages in Microsoft Excel

How to fix the error of printing blank pages in Microsoft Excel

How to fix the error of printing blank pages in Microsoft Excel. Why do some Excel documents not display data or contain blank pages when printed? Below are the reasons

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar, How to pin Office files to the taskbar icon on Windows 11? Invite

How to fix the error of not being able to save Excel files on Windows

How to fix the error of not being able to save Excel files on Windows

How to fix the error of not being able to save an Excel file on Windows. If you can't save the Excel file, don't worry too much. Below are ways to fix the error of not being able to save the above Excel file

How to insert a picture into a cell using VBA in Excel

How to insert a picture into a cell using VBA in Excel

How to insert a picture into a cell using VBA in Excel, You can easily insert pictures into Excel spreadsheets and edit them with macro code. Here's how to insert images

What to Know About Peaklight: New Stealth Malware Targets Illegal Movie Downloads

What to Know About Peaklight: New Stealth Malware Targets Illegal Movie Downloads

Now, a new attack called Peaklight is going viral and targeting people who download movies illegally.

Bluetooth 6.0 brings new technology that helps Apple improve Find My network

Bluetooth 6.0 brings new technology that helps Apple improve Find My network

The Bluetooth Special Interest Group (Bluetooth SIG) released the specifications for the next generation of the technology, called Bluetooth 6.0, this week.

How to use abstract images to create phone wallpapers

How to use abstract images to create phone wallpapers

You can create your own phone wallpapers from abstract photos. Not only are they beautiful, but the process of creating them is quite fun.

Why is choosing the right charger more difficult than it needs to be?

Why is choosing the right charger more difficult than it needs to be?

Choosing the wrong charger can cause your device to charge slowly or even break. And with so many options and similar products, finding the right one is harder than ever.

Users May Soon See Instagram Comments on Threads

Users May Soon See Instagram Comments on Threads

Instagram could roll out a way to share comments on other Instagram posts to Threads, according to Alessandro Paluzzi, who regularly analyzes Meta's social media apps to spot upcoming features.

List of features users want in Apple Intelligence

List of features users want in Apple Intelligence

The release of Apple Intelligence has many people excited, but there is still room for improvement. Apple could add some features to make it even better.

Facebook message statistics to see who messages the most on Facebook

Facebook message statistics to see who messages the most on Facebook

Facebook Messenger is currently the most used messaging application, so do you know who messages you the most? The following article will guide readers to see who messages the most on Messenger.

Why is Lens Blur a Photoshop tool used for artistic photo editing?

Why is Lens Blur a Photoshop tool used for artistic photo editing?

Adobe's Lens Blur tool makes it easy to review your photos, adding depth and focus to your photos.

How to translate Apple Podcasts directly

How to translate Apple Podcasts directly

iOS 17.4 adds live translation to Apple Podcasts. You can choose which languages ​​you want to translate to for the content of the podcast you're listening to.

US company develops nuclear battery that can operate continuously for 50 years

US company develops nuclear battery that can operate continuously for 50 years

Two US companies Kronos Advanced Technologies and Yasheng Group are working together to develop nuclear batteries that can operate continuously for decades without recharging to narrow the gap with China.

Killer birds blind and kill poisonous African snakes

Killer birds blind and kill poisonous African snakes

Despite possessing extremely dangerous venom, the tree snake can only endure the enemy's "heavenly" pecks to the eyes and head.

ChatGPT Will Kill These 4 Types of Websites

ChatGPT Will Kill These 4 Types of Websites

AI chatbots are completely reshaping the way users interact with websites and making some types of websites obsolete in the process.

The 6 Biggest Problems With Using One-Click AI Photo Enhancement Tools

The 6 Biggest Problems With Using One-Click AI Photo Enhancement Tools

AI photo enhancement tools promise to improve your photos with just one click. However, while these tools are convenient, there are still some problems with using them.

Jax DTCL season 8: Build, Fighter Jax team

Jax DTCL season 8: Build, Fighter Jax team

Jax DTCL season 8 is a carry even though he is a Fighter, his skills increase damage over time and that is the main reason he turns into a carry easily.

When Life Gives You Tangerines: A Story of Life, Love, and the Four Seasons of Jeju Island

When Life Gives You Tangerines: A Story of Life, Love, and the Four Seasons of Jeju Island

The movie When Life Gives You Tangerines has just been released on Netflix and has attracted the attention of fans with its heartwarming stories.