How do I remove spaces at the beginning of cells?
One way...
Use a temporary helper column and enter a formula like this:
=TRIM(A1)
Copy that formula down as far as needed.
Then, select the entire range of formulas and do:
Right clickCopy
Right clickPaste SpecialValuesOK
Compare the 2 columns and make sure the helper column removed the spaces
(they may not be standaed char 32 spaces). If everything checks out you can
then replace the original column of names with the space-removed column of
names.
--
Biff
Microsoft Excel MVP
"Munkeeric" wrote in message
...
I have a column of names I need to sort. Unfortunately, some of the cells
have 1 or 2 leading spaces, which cause the zero-leading spaces to be
sorted,
then the one-leading space, then two-leading space. And since there are
over
3000 names to be sorted, doing them by hand is problematic.
|