1. Home
  2. Functions
  3. Text
  4. TRIM

TRIM function

Removes spaces from the start and end of text and turns runs of spaces inside it into single spaces.

Syntax

=TRIM(text)

Arguments

ArgumentRequiredDescription
textRequiredThe text to trim

How to use TRIM

TRIM takes 1 required argument. Type =TRIM( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=TRIM(" First Quarter Earnings ")Result "First Quarter Earnings"

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.