Remove one space

  • Thread starter Thread starter ~Craig
  • Start date Start date
C

~Craig

I have a long column of text that I would like to remove
one space from.

I would like to remvoe the space where the X is:
-----------X---------------------
0058FGD8182 3/10/2004 Total-50.52

Is there a formula I can use?

Thanks,

Craig
 
It really depends.

Will the space you want removed always appear in the same position i
the string? (will there always be the same number of character
appearing before the space?)

Will the space you want removed always be the first space to appear i
each of the cells or is it possible that there will be another empt
space somewhere before it in each of the cells in the column?


Rolli
 
A roundabout way: Copy the column to Word and set the font
to Courier New. Do a vertical block select holding the
Alt-key down while dragging first to the right and then
down to select the column. Delete. Copy back to Excel.
 
Hi
if you want to remove the first space try
=LEFT(A1,FIND(" ",A1)-1) & MID(A1,FIND(" ",A1)+1,255)
 
There's a worksheet formula that will remove leading/trailing and eliminate
duplicated internal spaces:

=trim(a1)

(It'll leave one space when it elimates the duplicated internal spaces.)

Too drastic?
 
Hi Craig,
Since you are not splitting the line up into columns,
you might want to keep that extra space in front of your
single digit months part of dates. Though they aren't
going to actually line up unless you use a fixed width font.

But if you want to do this on a regular basis
you can use a macro see TrimALL macro in
http://www.mvps.org/dmcritchie/excel/join.htm#trimall
be sure to the Excel TRIM function instead of the
VBA TRIM function.
 
For your posted example..............

=LEFT(A1,11)&MID(A1,14,99)


Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top