Calc TRIM function

Removes all spaces from text except for single spaces between words.

Help CentreFunctions & Formulas

For a full list of available calculation functions, please read What calculation functions are supported.

This article describes the formula syntax and usage of the TRIM function.


Description

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.


Syntax

TRIM(text)


The TRIM function syntax has the following arguments:
  • text - Required. The text from which you want spaces removed.

Example

FormulaDescriptionResult
=TRIM(" First Quarter Earnings ")Removes leading and trailing spaces from the text in the formula (First Quarter Earnings)First Quarter Earnings

Errors

For a full list of formula errors, please read Formula errors.


Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.