TRIM is an excel formula that is used to remove extra spaces before or after a text in a cell. TRIM can be used when cleaning up text that has come from other applications or environments.
Below is an example:
In the above example, the TRIM formula is being used to remove the spaces before and after the text in the cell. We have used previously learnt LEN formula next to our text values to count the total characters in the cell. The first one, which has 2 spaces, before and after the text has 18 characters. The second one has 16 characters respectively.