TRIM Function in Excel

Home/Excel Formulas/TRIM Function in Excel

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.

PREMIUM TEMPLATES LIMITED TIME OFFER

ON SALE80% OFF

50+ Project Management Templates Pack
Excel PowerPoint Word

Advanced Project Plan & Portfolio Template
Excel Template

Business Presentations Templates Pack
PowerPoint Slides

20+ Excel Project Management Pack
Excel Templates

20+ PowerPoint Project Management Pack
PowerPoint Templates

10+ MS Word Project Management Pack
Word Templates


TRIMPur

What is the syntax of TRIM function?

TRIM(text)
TRIM Function in Excel syntax

TRIM Function in Excel – Examples

TRIM Function in Excel

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 “)

LIMITED TIME OFFER
By |January 25th, 2013|Excel Formulas|0 Comments

About the Author:

Excel VBA Developer having around 8 years of experience in using Excel and VBA for automating the daily tasks, reports generation and dashboards preparation. Valli is sharing to helps us automating daily tasks.

Leave A Comment


Related pages


vb6 database connection with accessvba sql servercopy range vbapowerpoint portfolio templateexcel 2010 macros not workingpaste special skip blanksabsolute reference excel shortcutvba query databaseexcel undo macrodatabase languages ddl dml dcldcl statementexcel flag duplicatesmerge text files in excelhow to use the lookup function in excelcell color function excelvba excel function returnhow to remove empty rows from excelexcel macro saveexcel vba list boxvba dynamic rangeabsolute reference excel shortcuthow to remove rows in exceldim fsoexcel delete all macroshow to add data validation in excelreturn vbahow do you sort columns in excelexcel offset functionvba advanced tutorialtcl tutorial ppthow to delete header in excelexcel vba columnsno of rows and columns in ms excelprotect cell in excel 2007hack excel vba passwordcountif tutorialneat excel tricksvba application.waitdynamic range excel vbavba code to unprotect sheet with passwordvba to remove duplicatesddl commands in sql with syntax and examplesestimate worksheet templateexcel password protected file forgot passwordhow to connect sql to exceldefine excel macrocombobox propertiesbreak protected sheet password excelvba create folderadding a macro to excelexcel filter out duplicatessql dmlexcel unhide sheetsexcel vba report examplecommand button vbavbcrlf in vbavba break statementwhat is the default column width in excelvba excel file openmerge columns in exceldeveloper ribbon in excelexcel 2013 match functionexcel using if statementswhat is vlookup in excel definitionexcel 2013 pivot tableselect column excel vbaexcel vba programming for dummies torrentsas sql interview questionsexcel vba filterexcel remove duplicate rowsstacked line graph excel