The TRIM Function in Excel

January 7, 2022

A free Office suite fully compatible with Microsoft Office

Free Download

Want to Learn Excel? Here is a WPS Spreadsheet online training that will teach you all the basics and advanced skills. Download WPS Office, easily find more about spreadsheet formulas, data, and cells in WPS professional spreadsheet tutorials.

· Description:

The TRIM function removes the leading and trailing spaces and the unnecessary spaces between words. When receiving the text with irregular spacing, you can use TRIM to modify quickly and easily.

· Syntax:


· Arguments:

Text: The text to remove the unnecessary spaces from.

· Example:

Assume that we have a group of text received from another application in improper format.

1. Select cell B2 and click the shortcutInsert Function button. In the pop-up box, enter TRIM and choose it.

2. Enter A2 at text and click OK. You can drag the fill handle down to fill other cells as needed.

3. This function also helps clean up the extra spacing between words. Repeat the above two steps and in cell B4 there returning a text value with proper spacing.

Was this helpful?