Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to Create Column Chart in Excel
  • Conditional Formatting New Rule with Formulas in Excel
  • Conditional Formatting Data bars Examples in Excel
  • How to create dynamic reference table name in Excel
  • How to count table rows in Excel

References

  • Extract data with helper column in Excel
  • Merge tables with VLOOKUP in Excel
  • How to use Excel VLOOKUP Function
  • Approximate match with multiple criteria in Excel
  • Last row number in range

Data Validations

  • How To Create Drop-down List in Excel
  • Excel Data validation exists in list
  • Excel Data validation only dates between
  • Prevent invalid data entering in specific cells
  • Excel Data validation must not contain

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 split text with delimiter in Excel

Syntax of TRIM function

TRIM(text)

Worked Example:   Normalize text by removing punctuations, extra spaces and more 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 count total words in a range 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:

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

Next Post:

Customize Ribbon In Excel

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

Logical Functions

  • Excel If, Nested If, And/Or Criteria Examples
  • Extract multiple matches into separate rows in Excel
  • How to return blank in place of #DIV/0! error in Excel
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • SWITCH function example in Excel

Date Time

  • Get fiscal quarter from date in Excel
  • Calculate time difference in hours as decimal value in Excel
  • How to calculate months between dates in Excel
  • Extract date from a date and time in Excel
  • How to calculate nth day of week in month in Excel

Grouping

  • Map text to numbers in Excel
  • Group numbers with VLOOKUP in Excel
  • Categorize text with keywords in Excel
  • Group arbitrary text values in Excel
  • Map inputs to arbitrary values in Excel

General

  • How to get Excel workbook path only
  • How to create dynamic named range with INDEX in Excel
  • Select, Insert, Rename, Move, Delete Worksheets in Excel
  • How to calculate decrease by percentage in Excel
  • 3D SUMIF for multiple worksheets in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning