Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tom
 
Posts: n/a
Default Stripping out imbedded spaces in a cell/row

Excel 2003
Is there a 'Strip' function in Excel 2003 so that I can strip out the
imbedded spaces between words/phrases that exist in one cell and put the
'compressed' result in another cell?
For example, if I have "Business Profile Stage 3" I'd like to 'strip' the
phrase to be 'BusinessProfileStage3". I just need to strip the spaces out,
nothing else (at this time..!!!). [Feature creep still exists!!]
I'm creating program variable names from useable phrases so the I can
understand what I did at a later date.
TIA,
Tom
[PS: Trim strips leading and trailing spaces but not imbedded. Using an
"AT" or "FIND" doesn't do it universally as I never know how many spaces I'll
need. Unless there's a creative way to iteratively find all spaces and
remove them.]
  #2   Report Post  
 
Posts: n/a
Default

Hi

Try Find/Replace. Put a space in the Find field, and leave the Replace field
blank.

--
Andy.


"Tom" wrote in message
...
Excel 2003
Is there a 'Strip' function in Excel 2003 so that I can strip out the
imbedded spaces between words/phrases that exist in one cell and put the
'compressed' result in another cell?
For example, if I have "Business Profile Stage 3" I'd like to 'strip' the
phrase to be 'BusinessProfileStage3". I just need to strip the spaces
out,
nothing else (at this time..!!!). [Feature creep still exists!!]
I'm creating program variable names from useable phrases so the I can
understand what I did at a later date.
TIA,
Tom
[PS: Trim strips leading and trailing spaces but not imbedded. Using an
"AT" or "FIND" doesn't do it universally as I never know how many spaces
I'll
need. Unless there's a creative way to iteratively find all spaces and
remove them.]



  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

You could replace space with nothing under editreplace or use

=SUBSTITUTE(A1," ","")

--
Regards,

Peo Sjoblom


"Tom" wrote in message
...
Excel 2003
Is there a 'Strip' function in Excel 2003 so that I can strip out the
imbedded spaces between words/phrases that exist in one cell and put the
'compressed' result in another cell?
For example, if I have "Business Profile Stage 3" I'd like to 'strip' the
phrase to be 'BusinessProfileStage3". I just need to strip the spaces
out,
nothing else (at this time..!!!). [Feature creep still exists!!]
I'm creating program variable names from useable phrases so the I can
understand what I did at a later date.
TIA,
Tom
[PS: Trim strips leading and trailing spaces but not imbedded. Using an
"AT" or "FIND" doesn't do it universally as I never know how many spaces
I'll
need. Unless there's a creative way to iteratively find all spaces and
remove them.]



  #4   Report Post  
Ron Coderre
 
Posts: n/a
Default

Have you tried the SUBSTITUTE function?
=SUBSTITUTE(A1," ","")

The above formula reads the text from cell A1 and replaces all spaces with
nothing ("").

OR

Can you just copy the cells to another column and use EditReplace to remove
all spaces?

Does that help?
Ron

  #5   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Tom,

In a spreadsheet, use the SUBSTITUTE function:

=SUBSTITUTE(A1," ","")

In VBA, you would use the Replace function:

myVar = Replace(Range("A1").Value, " ", "")
MsgBox myVar

HTH,
Bernie
MS Excel MVP


"Tom" wrote in message
...
Excel 2003
Is there a 'Strip' function in Excel 2003 so that I can strip out the
imbedded spaces between words/phrases that exist in one cell and put the
'compressed' result in another cell?
For example, if I have "Business Profile Stage 3" I'd like to 'strip' the
phrase to be 'BusinessProfileStage3". I just need to strip the spaces

out,
nothing else (at this time..!!!). [Feature creep still exists!!]
I'm creating program variable names from useable phrases so the I can
understand what I did at a later date.
TIA,
Tom
[PS: Trim strips leading and trailing spaces but not imbedded. Using an
"AT" or "FIND" doesn't do it universally as I never know how many spaces

I'll
need. Unless there's a creative way to iteratively find all spaces and
remove them.]





  #6   Report Post  
Tom
 
Posts: n/a
Default

Here's what I think you're saying:
=REPLACE(FIND(" ",B18),1,LEN(B18),)
It didn't work so I'm unable to see what you're driving at.
Thanks,
Tom

"Andy B" wrote:

Hi

Try Find/Replace. Put a space in the Find field, and leave the Replace field
blank.

--
Andy.


"Tom" wrote in message
...
Excel 2003
Is there a 'Strip' function in Excel 2003 so that I can strip out the
imbedded spaces between words/phrases that exist in one cell and put the
'compressed' result in another cell?
For example, if I have "Business Profile Stage 3" I'd like to 'strip' the
phrase to be 'BusinessProfileStage3". I just need to strip the spaces
out,
nothing else (at this time..!!!). [Feature creep still exists!!]
I'm creating program variable names from useable phrases so the I can
understand what I did at a later date.
TIA,
Tom
[PS: Trim strips leading and trailing spaces but not imbedded. Using an
"AT" or "FIND" doesn't do it universally as I never know how many spaces
I'll
need. Unless there's a creative way to iteratively find all spaces and
remove them.]




  #7   Report Post  
 
Posts: n/a
Default

Hi
What I meant was to use Edit/Find . . Replace.!

--
Andy.


"Tom" wrote in message
...
Here's what I think you're saying:
=REPLACE(FIND(" ",B18),1,LEN(B18),)
It didn't work so I'm unable to see what you're driving at.
Thanks,
Tom

"Andy B" wrote:

Hi

Try Find/Replace. Put a space in the Find field, and leave the Replace
field
blank.

--
Andy.


"Tom" wrote in message
...
Excel 2003
Is there a 'Strip' function in Excel 2003 so that I can strip out the
imbedded spaces between words/phrases that exist in one cell and put
the
'compressed' result in another cell?
For example, if I have "Business Profile Stage 3" I'd like to 'strip'
the
phrase to be 'BusinessProfileStage3". I just need to strip the spaces
out,
nothing else (at this time..!!!). [Feature creep still exists!!]
I'm creating program variable names from useable phrases so the I can
understand what I did at a later date.
TIA,
Tom
[PS: Trim strips leading and trailing spaces but not imbedded. Using
an
"AT" or "FIND" doesn't do it universally as I never know how many
spaces
I'll
need. Unless there's a creative way to iteratively find all spaces and
remove them.]






  #8   Report Post  
 
Posts: n/a
Default

Hi
Having re-read your post, I think I'm barking up the wrong tree! You want
the original cell value and the new cell value. I was getting rid of the
spaces in the existing cells.

--
Andy.


<Andy B wrote in message ...
Hi
What I meant was to use Edit/Find . . Replace.!

--
Andy.


"Tom" wrote in message
...
Here's what I think you're saying:
=REPLACE(FIND(" ",B18),1,LEN(B18),)
It didn't work so I'm unable to see what you're driving at.
Thanks,
Tom

"Andy B" wrote:

Hi

Try Find/Replace. Put a space in the Find field, and leave the Replace
field
blank.

--
Andy.


"Tom" wrote in message
...
Excel 2003
Is there a 'Strip' function in Excel 2003 so that I can strip out the
imbedded spaces between words/phrases that exist in one cell and put
the
'compressed' result in another cell?
For example, if I have "Business Profile Stage 3" I'd like to 'strip'
the
phrase to be 'BusinessProfileStage3". I just need to strip the spaces
out,
nothing else (at this time..!!!). [Feature creep still exists!!]
I'm creating program variable names from useable phrases so the I can
understand what I did at a later date.
TIA,
Tom
[PS: Trim strips leading and trailing spaces but not imbedded. Using
an
"AT" or "FIND" doesn't do it universally as I never know how many
spaces
I'll
need. Unless there's a creative way to iteratively find all spaces
and
remove them.]







  #9   Report Post  
Tom
 
Posts: n/a
Default

Thanks to all who jump in... I guess I didn't check the SUBSTITUTE function
because my brain wanted a "STRIP" function. Oh well.. glad it's Friday!
:-)

"Bernie Deitrick" wrote:

Tom,

In a spreadsheet, use the SUBSTITUTE function:

=SUBSTITUTE(A1," ","")

In VBA, you would use the Replace function:

myVar = Replace(Range("A1").Value, " ", "")
MsgBox myVar

HTH,
Bernie
MS Excel MVP


"Tom" wrote in message
...
Excel 2003
Is there a 'Strip' function in Excel 2003 so that I can strip out the
imbedded spaces between words/phrases that exist in one cell and put the
'compressed' result in another cell?
For example, if I have "Business Profile Stage 3" I'd like to 'strip' the
phrase to be 'BusinessProfileStage3". I just need to strip the spaces

out,
nothing else (at this time..!!!). [Feature creep still exists!!]
I'm creating program variable names from useable phrases so the I can
understand what I did at a later date.
TIA,
Tom
[PS: Trim strips leading and trailing spaces but not imbedded. Using an
"AT" or "FIND" doesn't do it universally as I never know how many spaces

I'll
need. Unless there's a creative way to iteratively find all spaces and
remove them.]




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
remove spaces in text in excel GnarlyCar Excel Discussion (Misc queries) 3 February 1st 05 05:02 PM
Sumproduct ... Empty Cells vs Spaces? Ken Excel Discussion (Misc queries) 9 December 17th 04 08:03 PM


All times are GMT +1. The time now is 11:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"