TRIM
Excel TRIM Function performs space or white characters cleaning and return string except single space between words. Trim is a worksheet function which is very useful for formatting the data consistency.
Syntax
=TRUM(text)
Parameter
- text: refers to a text or string that needs to be trimmed or from which space needs to be removed.
Formula example

Output

To verify we have used LEN Function before trimming the value and after trimming the value.
Next >> Change sheet tab color using VBA in Excel with code example