What is the use of TRIM function?
TRIM Function in Excel removes unwanted spaces whether they occur between words or at the beginning or end of a string, except for single spaces between words.
50+ Project Management Templates Pack
Excel PowerPoint Word
Advanced Project Plan & Portfolio Template
Business Presentations Templates Pack
20+ Excel Project Management Pack
20+ PowerPoint Project Management Pack
10+ MS Word Project Management Pack
What is the syntax of TRIM function?
TRIM Function in Excel – Examples
In the above examples, you can observe how TRIM function is removing the unwanted spaces:
Example 1: Removing the spaces (between ANALYSIS and TABS) of the given string
Example 2: Removing the spaces (left side of the mongopono.ru) of the given string
Example 3: Removing the spaces (right side of the mongopono.ru) of the given string
Example 4: Removing the spaces (anywhere) of the given string
VBA example on TRIM function
TRIM function is also available in VBA, following is the example code:
Dim sOutout As String
sOutout =Trim(” Analysis Tabs “)