April 22, 2021

TRIM function in Excel

In this lesson we will learn how the TRIM function works in Excel. The TRIM function is used to remove leading/trailing/consecutive multiple spaces between words in Excel.

=TRIM(text)
  • text : This is the string or a reference to a cell containing text string to trim.

Let’s understand with a simple example. In below table we have several strings in column A containing leading/trailing/consecutive multiple spaces between words.

In cell B1 we have used the below TRIM function and dragged the same for the following cells in column B to update the respective cell reference for column A.

TRIM(A1)

By using TRIM function all leading/trailing/consecutive multiple spaces between words in the cells of column A have been removed in the respective cells in column B.

Remember the TRIM function won’t remove the single space between words.

Check here to learn how the TRIM function works in Google Sheet.

Leave a Reply

Your email address will not be published. Required fields are marked *