Removing spaces from cells...

RickDB

Registered User.
Local time
Yesterday, 19:18
Joined
Jun 29, 2006
Messages
101
In an Excel document with 33,000 lines, each cell has a space at the beginning of the text. I only want to remove this space at the beginning, does anyone know how to do this?

Thank you!
 
You need to create a formula in the next column, that uses the LEN and LEFT functions. find the length, subtract 1. copy formula down the new column, if correctly done, then copy the whole new column and paste back as 'Paste Special' and select value.
This will turn the formula into the text value
Then delete the original column
If any of that sounds too :confused: then I'll give you more detail
lightray
 
Thanks Len, I imported into Access and used the Len command in a query. I wasn't familiar with the same process in Excel... Thanks!
 
Oops! sorry no paying attention meant LEN and RIGHT
Formula: =RIGHT(A11,LEN(A11)-1)
lightray
 
An alternative is LTrim - trims whitespace off the left (ie start) of a string
So it doesn't matter if it's got one or 100 spaces at the front.

If you want to remove the spaces at the end, use RTrim, and if you want to remove at both ends, just use Trim.
 
Actually, TRIM is the function in Excel and trims both leading and trailing spaces (different than Access).

=TRIM(A11)
________
DISCUSS VAPORIZERS
 
Last edited:

Users who are viewing this thread

Back
Top Bottom