Hi Brenda, and Paul,
'You could be in for a long wait (like about 3 minutes per column)
if you tried to select entire columns or the entire sheet.
You might also be in for a very unpleasant
surprise if you had formulas on the page. Take a look at the
TRIMALL macro on my page.
http://www.mvps.org/dmcritchie/excel/join.htm#trimall
instructions to install a macro are on my page
http://www.mvps.org/dmcritchie/excel/getstarted.htm
You might also look at some timings on such things in
http://www.mvps.org/dmcritchie/excel/proper#speed
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.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:
http://www.mvps.org/dmcritchie/excel/search.htm
Paul Simon said:
Hi Brenda,
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
I hope this helps,
Paul