ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   removing a space between words in a cell (https://www.excelbanter.com/excel-worksheet-functions/46116-removing-space-between-words-cell.html)

JenBasch

removing a space between words in a cell
 

I am trying to figure out how to remove a space between two words in one
cell.

ex: dog house ---- doghouse

Once I figure that out I want it to look through a lot of cells and if
they have a space take it out (above) and if not leave it the way it
is.

Thanks for any help available,
Jen


--
JenBasch
------------------------------------------------------------------------
JenBasch's Profile: http://www.excelforum.com/member.php...o&userid=27369
View this thread: http://www.excelforum.com/showthread...hreadid=468842


swatsp0p


assuming you only have one space per cell to eliminate, use this formula
in another cell (say B1):

B1=LEFT(A1,(FIND(" ",A1)-1))&MID(A1,FIND(" ",A1)+1,LEN(A1)-(FIND("
",A1)))

of course, adjust the cell reference to meet your needs.

A1=dog house returns: doghouse in B1

HTH

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=468842


David Billigmeier

A LOT easier formula is:
=SUBSTITUTE(A1," ","")


--
Regards,
Dave
<!--


"JenBasch" wrote:


I am trying to figure out how to remove a space between two words in one
cell.

ex: dog house ---- doghouse

Once I figure that out I want it to look through a lot of cells and if
they have a space take it out (above) and if not leave it the way it
is.

Thanks for any help available,
Jen


--
JenBasch
------------------------------------------------------------------------
JenBasch's Profile: http://www.excelforum.com/member.php...o&userid=27369
View this thread: http://www.excelforum.com/showthread...hreadid=468842



Gord Dibben

A LOT easier may be EditReplace

what: space

with: nothing

Replace all.


Gord Dibben Excel MVP

On Mon, 19 Sep 2005 09:28:09 -0700, "David Billigmeier"
wrote:

A LOT easier formula is:
=SUBSTITUTE(A1," ","")




All times are GMT +1. The time now is 11:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com