TRIM: Bye bye pesky spaces

When you've been given too much space.

So you imported a significant amount of text data you want to work with into Excel.

The catch is there are all these unnecessary double, triple or quadruple spacing between the words within the cells.

For one horrifying moment, you break a cold sweat thinking about manually removing all that extra spacing.

 

 
 

TRIM, cut it out please.

TRIM() function to the rescue. This function removes all double, triple, quadruple etc. spacing. 

All you need to do is reference the problematic cell in the function. The TRIM() function reads as =TRIM(text), with the (text) portion to be replaced by the problematic cell.

Oh and don't be fooled by the word "text" used in the function, it works for numbers too. 

 Hi-five after you remove unnecessary spaces with Excel TRIM
 

Sharpening it further. 

You'll need an additional VALUE() function when dealing with numbers.

The full function should read as =VALUE(TRIM(text)) in this case, and ensures that excel continues to recognise these figures as numbers.

You'll want to do this so formulas like SUM() remains workable on the trimmed digits.  See here: 

Using only TRIM() for numbers:

Using VALUE() together with TRIM() for numbers:

 

The result is just...