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

Lookup and Reference Examples

  • How to get last column number in range in Excel
  • How to use Excel ROW Function
  • How to use Excel MMULT Function
  • How to get relative column numbers in a range in Excel
  • How to use Excel OFFSET function

Data Analysis Examples

  • Excel Line Chart
  • Calculate Conditional Percentile ‘IF’ in table in Excel
  • Understanding Pivot Tables in Excel
  • Get column index in Excel Table
  • Working With Tables in Excel

Data Validation Examples

  • How To Create Drop-down List in Excel
  • Excel Data validation only dates between
  • Excel Data validation unique values only
  • Prevent invalid data entering in specific cells
  • Excel Data validation number multiple 100

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 get last line in cell in Excel

Syntax of TRIM function

TRIM(text)

Worked Example:   Split numbers from units of measure 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:   Put names into proper case -- Manipulating NAMES 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 calculate Number of Instances in Excel
  • How to strip html from text or numbers in Excel
  • How to strip numeric characters from cell in Excel
  • FIND, FINDB functions: Description, Usage, Syntax, Examples and Explanation
  • How to count specific words in a range in Excel
  • DATEVALUE function: Description, Usage, Syntax, Examples and Explanation
  • Calculate total hours that fall between two times in Excel
  • DATE function: Description, Usage, Syntax, Examples and Explanation
  • Next biweekly payday from date in Excel
  • Pad week numbers with zeros in Excel
  • Calculate payment for a loan in Excel
  • Calculate original loan amount in Excel
  • COUPDAYS function: Description, Usage, Syntax, Examples and Explanation
  • FVSCHEDULE function: Description, Usage, Syntax, Examples and Explanation
  • DOLLARFR function: Description, Usage, Syntax, Examples and Explanation
© 2022 xlsoffice . All Right Reserved. | Teal Smiles