Removing spaces from cells... (1 Viewer)

RickDB

Registered User.
Local time
Today, 02:55
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!
 

lightray

Registered User.
Local time
Today, 18:55
Joined
Sep 18, 2006
Messages
270
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
 

RickDB

Registered User.
Local time
Today, 02:55
Joined
Jun 29, 2006
Messages
101
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!
 

lightray

Registered User.
Local time
Today, 18:55
Joined
Sep 18, 2006
Messages
270
Oops! sorry no paying attention meant LEN and RIGHT
Formula: =RIGHT(A11,LEN(A11)-1)
lightray
 

Adeptus

What's this button do?
Local time
Today, 16:25
Joined
Aug 2, 2006
Messages
300
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.
 

shades

Registered User.
Local time
Today, 01:55
Joined
Mar 25, 2002
Messages
516
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

Top Bottom