How to

How to Use the TRIM Function in Microsoft Excel

When you copy text into Microsoft Excel, it can occasionally come with characters you ‘d prefer to see gotten rid of, such as unneeded areas. Instead of get rid of these by hand, you can use the TRIM function to do it for you.

What Is the TRIM Function?

TRIM is a really basic Microsoft Excel function that gets rid of any extra areas from a specific text string or from a cell consisting of text, leaving just a single space between words.

For instance, let’s presume that a cell in Excel consists of a text string like this:

This string itself consists of a single space between each word. However, if there were additional spaces in your text string before the very first word (eg. ” This is a text string.”) or if it had multiple areas in between words (eg. “This is a text string.”), then you could utilize the TRIM function to eliminate these for you.

While you might do this manually, TRIM enables you to quickly remove unneeded areas from big sets of information, conserving you time in the process.

There is one constraint, however. TRIM gets rid of the ASCII space character (decimal worth 32) from text strings, which is the standard space character utilized in the majority of text.

The exception to this is for text on web pages, where the Unicode non-breaking space character (decimal worth 160) is frequently utilized for areas. TRIM will not eliminate this, so if this character exists in your text, you’ll require to remove it by hand.

How to Use the TRIM Function in Microsoft Excel

To help you comprehend how to use the TRIM function in Excel, we’ll explore the 2 primary techniques for applying it in a new formula utilizing sample information.

If you’re developing a formula using TRIM, it has only a single argument– the text itself. This can be text you insert into the formula straight or a cell reference to a cell that contains your text.

For instance, the following formula uses TRIM to eliminate unnecessary space characters from cell A2. To utilize this formula yourself, change the cell reference “A2” with your own.

To remove extra areas from a text string straight, you could utilize the following formula, changing the example string with your own text.

As previously discussed, TRIM is just designed to eliminate extra ASCII space characters (decimal worth 32) from text strings. If you’re still seeing unnecessary areas, this is likely triggered by a non-breaking space character (Unicode decimal worth 160) in your text.

TRIM does not support these, so you’ll need to by hand examine and remove these characters from your text if you ‘d prefer to utilize it.

When you copy text into Microsoft Excel, it can occasionally come with characters you ‘d prefer to see removed, such as unneeded areas. The exception to this is for text on web pages, where the Unicode non-breaking area character (decimal value 160) is often utilized for areas. If you’re producing a formula utilizing TRIM, it has only a single argument– the text itself. The following formula uses TRIM to eliminate unneeded area characters from cell A2.

Leave a Reply