By winging your way on over to Dave McRitchies excellent addin called TrimAll. Just like Ronseal,
it does what it says on the tin (The Brits will understand anyway). Available free from:-
First select the area to be trimmed, then run this code:
Application.Screenupdating = False
For Each cel In Selection
cel.Value = Application.WorksheetFunction.Trim(cel.Value)
Next
Application.Screenupdating = True
If you know you need a macro in the future the programming
group would be the correct group. If you don't know if you need
a programming solution or a worksheet solution or doesn't fit
you can post the misc group for general type questions.
Since there is no built-in solution for Excel to process the entire
sheet you would need a macro.
Thank you very much for your response, David. Your TrimAll code does
indeed work SIGNIFICANTLY faster than the one I suggested (and which I
have been using). The other issues it addresses are important to note
as well. Consequently, I've replaced my code with yours in my
Personal.xls.
Many thanks for this and other very useful code you've shared with the
group.
Paul