What's new

excel question: blank spaces (1 Viewer)

Ted Lee

Senior HTF Member
Joined
May 8, 2001
Messages
8,390
hi all -

does anyone know if excel can parse a spreadsheet and remove any blank spaces at the end of any given cell?

so the cell looks like:

"text_" (where _ is a blank space)

when it should look like:

"text" (with no blank space at the end).

hope that makes sense...

:)
 

Glenn Overholt

Senior HTF Member
Joined
Mar 24, 1999
Messages
4,201
I think that makes sense. Put your cursor after the last 't', run it for a few spaces and then highlight and hit the delete button.

Glenn
 

Tim Markley

Screenwriter
Joined
Jun 12, 1999
Messages
1,279
There's a VBA function called RTrim that will remove trailing spaces. A1=RTrim(A1) As far as I know, there isn't any kind of function that you could use without running some VBA code.
 

Ted Lee

Senior HTF Member
Joined
May 8, 2001
Messages
8,390
thx glenn - that much i know! :) :D

the problem is these spreadsheets can be hundreds of cells large -- if not more. i want excel to automatically "search and destroy"....

vba code? ugh.... :)
 

Kraig Lang

Stunt Coordinator
Joined
May 28, 2000
Messages
199
Do you have spaces in the text itself? If not, you can do a Replace all.

If you do, the trim formula will work. What you'll need to do is create a second worksheet. In the A1 cell of your new worksheet, use the formula =TRIM(Firstworksheet!A1), where firstworksheet is the name of your original spread sheet, and then copy the formula into the rest of the cells on the second worksheet.

The formulas should auto populate with the cells in direct reference from the first worksheet.

Does that make any sense at all? Sorry if I confused you.

[Edit] whoops, forgot to mention that you'll need to do a copy/paste special/values into a 3rd worksheet to remove all the formulas.
 

Users who are viewing this thread

Sign up for our newsletter

and receive essential news, curated deals, and much more







You will only receive emails from us. We will never sell or distribute your email address to third party companies at any time.

Forum statistics

Threads
357,064
Messages
5,129,895
Members
144,283
Latest member
Nielmb
Recent bookmarks
0
Top