Formulas > =TRIM()

How To Use TRIM() Function in Google Sheets

Description

Removes leading and trailing spaces in a specified string.

How To Actually Use TRIM() in Sheets

TRIM(text)

Try TRIM yourself

Use the TRIM formula to remove leading and trailing spaces from the text in cells A1:A10. The result should be displayed in the corresponding cells in B1:B10.

Hints (2)

1 Better Sheets Tutorial

Clean Up Names in a List

Clean Up Names in a List

In this video, I will show you how to clean up a list of names that may have extra white spaces using a formula. I will demonstrate how to identify and remove the extra spaces programmatically, making the list of names unique. By using the TRIM formula, we can easily clean up the names and create a new list with only the unique names. No action is required from you, just watch and learn!
TRIM() UNIQUE()

Learn more about the TRIM() formula:

Generate a TRIM() formula for your needs

Describe your task in plain English and get a paste-ready formula that uses TRIM(). 2 free AI generations, no signup. Members get unlimited use.

Generate a TRIM() formula