RickDB
11-07-2006, 04:41 PM
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!
Thank you!
|
View Full Version : Removing spaces from cells... RickDB 11-07-2006, 04:41 PM 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 11-07-2006, 06:33 PM 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 11-07-2006, 06:49 PM 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 11-07-2006, 07:00 PM Oops! sorry no paying attention meant LEN and RIGHT Formula: =RIGHT(A11,LEN(A11)-1) lightray Adeptus 11-07-2006, 08:16 PM 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 11-08-2006, 11:10 AM Actually, TRIM is the function in Excel and trims both leading and trailing spaces (different than Access). =TRIM(A11) |