Arrow left
Back to guides
Excel Formulas

TRIM Function in Excel: Explained

In this article, you will learn how to use the TRIM formula in Excel.

 

What is the TRIM formula in Excel?

The TRIM function in Excel is used to remove extra spaces from a text string, leaving only a single space between words.

 

When is the TRIM function beneficial in Excel?

The TRIM formula can be useful when dealing with data that has been copied and pasted from other sources as you can remove extra characters from your data and make it easier to work with.

  1. Cleaning up data: The TRIM function can be used to remove leading, trailing, and extra spaces from data that has been copied or imported from other sources such as websites or spreadsheets. These sources often include extra spaces, tabs, or other characters that can make the data difficult to work with.
  2. Comparing text: Sometimes, text that appears to be identical may contain hidden spaces, causing errors when comparing or sorting. Using TRIM can eliminate these errors.
  3. Formatting: Extra spaces can cause formatting issues, especially when text is aligned or wrapped. TRIM can ensure that text is correctly formatted.
  4. Counting characters: If you need to count the number of characters in a cell, but there are extra spaces, the TRIM function can be used to remove them, making the character count accurate.

 

How to use the TRIM formula in Excel

1. Select the cell where you want to display the trimmed string.

2. Type the following formula into the cell: =TRIM(

3. The cell should now display the trimmed text string with no extra spaces.

Syntax: 

=TRIM(text)

where input is the text which you want to remove extra space from.

See below for how the formula is used:

How to use the TRIM function in Excel

Analyze your live financial data in a snap in Google Sheets

Are you learning this formula to visualize financial data, build a financial model, or conduct financial analysis? In that case, LiveFlow may help you automate manual workflows, update numbers in real-time, and save time. You can access various financial templates on our website, from the simple Income Statement to Multi-Currency Consolidated Financial Statement. Are you interested in this product but are an Excel user? That’s not a problem at all. You can connect Google Sheets to Excel quickly.

To learn more about LiveFlow, book a demo.

Automate any custom financial dashboard in Google Sheets with LiveFlow

 

You can learn about other Excel and Google Sheets formulas and tips that are not mentioned here on this page: LiveFlow‘s How to Guides

Learn how to do this step-by-step in the video below 👇

Automate financial reporting with LiveFlow

Want to eliminate manual updates of your Excel & Google Sheets models?

Yes, show me how

Need help?

Our team is here to help you any time between 9am and 10pm EST.
Check Icon
Email us at: help@liveflow.io

Liked this article? Then you'll love the ones below