Exceljet

Quick, clean, and to the point

Excel TRIM Function

Excel TRIM function
Summary 

The Excel TRIM function strips extra spaces from text, leaving only a single space between words and no space characters at the start or end of the text.

Purpose 
Remove extra spaces from text
Return value 
Text with extra spaces removed.
Syntax 
=TRIM (text)
Arguments 
  • text - The text from which to remove extra space.
Usage notes 
  • TRIM strips extra spaces from text, leaving 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.
  • TRIM only removes the ASCII space character (32) from text.
  • Unicode text often contains a non-breaking space character (160) that appears in web pages as the HTML entity,  . This will not be removed with TRIM. See the Microsoft article  Remove spaces and non-printing characters from text for more information.

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.