Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • Offset in Excel
  • How to use Excel MMULT Function
  • How to use Excel ROW Function
  • Basic INDEX MATCH approximate in Excel
  • Find closest match in Excel

Data Analysis Examples

  • Chart Axes in Excel
  • Excel Pie Chart
  • How to add Trendline to a chart in Excel
  • Understanding Anova in Excel
  • How To Create Frequency Distribution in Excel

Data Validation Examples

  • Excel Data validation don’t exceed total
  • Excel Data validation allow weekday only
  • Excel Data validation date in next 30 days
  • Excel Data validation must not contain
  • Excel Data validation unique values only

TRIM function: Description, Usage, Syntax, Examples and Explanation

by

What is TRIM function in Excel?

TRIM function is one of TEXT functions in Microsoft Office Excel that removes all spaces from text except for single spaces between words. Use TRIM on text that you have received from another application that may have irregular spacing.

Important: The TRIM function was designed to trim the 7-bit ASCII space character (value 32) from text. In the Unicode character set, there is an additional space character called the nonbreaking space character that has a decimal value of 160. This character is commonly used in Web pages as the HTML entity,  . By itself, the TRIM function does not remove this nonbreaking space character.

Worked Example:   How to strip numeric characters from cell in Excel

Syntax of TRIM function

TRIM(text)

Worked Example:   How to check cell equals one of many things in Excel

The TRIM function syntax has the following arguments:

  • Text    Required. The text from which you want spaces removed.

Example of TRIM function

Steps to follow:

1. Open a new Excel worksheet.

2. Copy data in the following table below and paste it in cell A1

Note: For formulas to show results, select them, press F2 key on your keyboard and then press Enter.

Worked Example:   How to Remove Leading Spaces in Excel

You can adjust the column widths to see all the data, if need be.

Formula Description Result
=TRIM(” First Quarter Earnings “) Removes leading and trailing spaces from the text in the formula (First Quarter Earnings) First Quarter Earnings

Post navigation

Previous Post:

TEXT function: Description, Usage, Syntax, Examples and Explanation

Next Post:

UNICHAR function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • How to count total words in a range in Excel
  • How to get top level domain (TLD) in Excel
  • How to translate letters to numbers in Excel
  • How to count number of characters of text in a cell in Excel
  • How to split text with delimiter in Excel
  • How to calculate most recent day of week in Excel
  • Count day of week between dates in Excel
  • How to get Weekdays, Working days between Two Dates in Excel
  • Get work hours between dates in Excel
  • Calculate years between dates in Excel
  • PDURATION function: Description, Usage, Syntax, Examples and Explanation
  • NPER function: Description, Usage, Syntax, Examples and Explanation
  • IRR function: Description, Usage, Syntax, Examples and Explanation
  • Calculate interest for given period in Excel
  • AMORLINC function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2021 xlsoffice. All Rights Reserved | Teal Smiles