Title: MS Excel: How to use the TRIM Function (WS, VBA)
Headings: MS Excel:
How to use the TRIM Function (WS, VBA)

MS Excel: How to use the TRIM Function (WS, VBA)
Description
Syntax
Parameters or Arguments
text
Returns
Applies To
Type of Function
Example (as Worksheet Function)
Clean Up Spacing Between Words
Example (as VBA Function)

Content: Tech on the Net"  =TRIM (A2) Result: " 1234"  =TRIM (A3) Result: " alphabet soup"  =TRIM (A4) Result: " www.techonthenet.com"  =TRIM (" apples ") Result: " apples"
Clean Up Spacing Between Words
You can also use the TRIM function in Excel to remove unnecessary spaces between words in a string. The TRIM function will reduce the spacing between words down to a single space. Let's look at an example of how to use the TRIM function to clean up the spacing between words in Excel. Based on the spreadsheet above: =TRIM (A1) Result: " techonthenet.com is a great resource for Excel"  =TRIM ("123 Main St.") Result: "