Let's look at some Excel Trim function examples and explore how to use the Trim function as a worksheet function in Microsoft Excel:
Summary
The Excel TRIM function remove extra spaces from text, leading only a single space between words and no space characters at the start or end of the text.
In financial analysis, the TRIM function can be useful in removing irregular spacing from data imported from other applications.
The Trim function is a built-in function in Excel that is categorized as a Text Function.
In financial analysis, the TRIM function can be useful in removing irregular spacing from data imported from other applications.
The Trim function is a built-in function in Excel that is categorized as a Text Function.
Purpose
Remove extra spaces from text.
Return value
Text with removed extra spaces.
What Does It Do ?
This function removes unwanted spaces from a piece of text.
The spaces before and after the text will be removed completely.
Multiple spaces within the text will be trimmed to a single space.
The spaces before and after the text will be removed completely.
Multiple spaces within the text will be trimmed to a single space.
Syntax
TRIM function has one syntax and hence they can be written in Two different ways:
=TRIM(text) or
=TRIM(cell reference)
=TRIM(text) or
=TRIM(cell reference)
Parameters or Arguments
Text: The text from which to remove extra space.
Cell reference: Reference to cells containing text.
Cell reference: Reference to cells containing text.
Formatting
No special formatting is needed.
Usage notes
- TRIM function will remove unnecessary spaces between words in a string.Thus, it will leave only single spaces between words and no space characters at the start or end of the text.
- TRIM is useful when cleaning up text that has come from other applications or environments.
- Excel TRIM Function is only able to remove the ASCII space character (32) from text/string.
TRIM function not working
The TRIM function is designed to remove only the space character, represented by code value 32 in the 7-bit ASCII character set. In the Unicode character set, there is one more space character called the non-breaking space, which is commonly used on web pages as the html character. The non-breaking space has a decimal value of 160, and the TRIM function cannot remove it by itself.
No comments:
Post a Comment