The Excel TRIM Function
Basic DescriptionThe Excel TRIM function takes a supplied text string and removes any spaces, except for single spaces between words or characters. The format of the function is: TRIM( text )
where the argument, text, can be supplied to the function directly, or can be a reference to a cell containing text. Note that the Trim function differs from the Clean Function in that the Trim function removes additional spaces (represented by the ASCII numeric code 32), while the Clean Function removes characters with the ASCII numerics codes 0 to 31. ExampleThe example below shows the Trim function used on four different text strings.
In all four of the above cases, the result is the string "trim text"
- with no spaces at the start or end and just one space in the middle. |
|||
|
|
|||
Copyright © 2008-2010 ExcelFunctions.net |