TRIM Function. Remove unnecessary spaces between and before and after words, leaving one space between words.(Microsoft Excel)

03/26/2024

Japanese version.

The TRIM function removes all unnecessary spaces in a sentence.
It is suitable for formatting data imported from other applications or manually inputted in large quantities.

How it works

=TRIM(text)
NameOmissionExplanation
textSpecify the target string.

Demonstrate

This is an example of the result of executing the TRIM function.

The LEN function is used to display the number of characters, as it is difficult to discern visually.

All preceding and following spaces are deleted.
One space between words will be deleted.
TAB characters are not deleted, so use the CLEAN or SUBSTITUTE function.

Spill

If you specify the argument "text" the cell range, it will be Spil.

---

Links

Microsoft Excel Functions Text