Text
TRIM function
Remove extra spaces. TRIM works in Sheets with the usual arguments and results, on cells and on live data from the tools you connect.
Syntax
=TRIM(text) | Argument | Use |
|---|---|
text | required |
Example
Remove leading, trailing and double spaces.
| A | B | |
|---|---|---|
| 1 | Name | |
| 2 | ada lovelace | [email protected] |
| 3 | grace hopper | [email protected] |
| 4 | ada lovelace |
Result computed by the Sheets formula engine.
On live data
In Sheets, TRIM sits next to live data from a connected tool: =data.orders.sum(total) totals a table, =list.orders(customer) spills a column's distinct values, and a linked table column such as table.orders[Total] is a range any function accepts.
More text functions
CONCATJoin text stringsLEFTFirst characters of textLENString lengthLOWERLowercasePROPERCapitalize each wordSUBSTITUTEReplace textTEXTFormat a number or date as textTEXTJOINJoin texts with a delimiterARRAYTOTEXTValues of an array as one textASCFull-width characters to half-widthBAHTTEXTNumber as Thai baht textCHARCharacter for a code from 1 to 255
Spreadsheet formulas on live business data
Sheets evaluates 491 spreadsheet functions, on cells and on data read live from your tools.