The TRIM function of Excel is very useful to remove extra spaces in your cell and then, avoid tons of errors.
How to count the number of words in an Excel cell? With Excel, you can use 2 techniques to return this result.
If you want to remove the extra spaces in a cell, there is a function for that ; it's the TRIM function. But you must convert your formula in values.