how do you collapse multip words into 1 big word in a cell

tankan

New Member
Joined
Jul 7, 2004
Messages
48
hi

iv'e got a few words in 1 cells in a column.

iv'e got a search facilyt based on collapsing these words..

so if cell has

cat in the hat went to bat

it should convert into one word, (remove spaces)

catinthehatwenttobat

thanks in advance
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Nimrod

MrExcel MVP
Joined
Apr 29, 2002
Messages
6,259
Use Replace Tool

Just use "replace", found on the "edit" menu , and replace all spaces with no spaces .

eg in "Find What" just type one space by hitting space bar... then click the "Replac All" button

Note: make sure you select the range you want this to occur on . :eek:
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,286
Office Version
  1. 365
Platform
  1. Windows
=SUBSTITUTE(A1," ","")
 

jindon

MrExcel MVP
Joined
Aug 21, 2004
Messages
16,995

ADVERTISEMENT

Hi

try

=SUBSTITUTE(A1,CHAR(32),"")
 

tankan

New Member
Joined
Jul 7, 2004
Messages
48
hi thanks guys

just a few things, which i should have also mentioned .. how to deal with the capital letters.. i'd like all words in a cell to be reduced to lower...

NOrie, with your solution, it works, but where you have two capital letters it doesn't work, only with changing the first word to lower case....

eg. The Cat

becomes: theCat

how to change all words, every character to lower?

Jindon, I've tried yorus and it batches it all together with no spaces, but

still doesn't work to reduce the capital...

The Cat becomes:

Norie, i could use find and replace, but the capital letters will still remain...

any help with collapsing space and reducing capital for all words in a cell?

thanks in advance..
 

Watch MrExcel Video

Forum statistics

Threads
1,130,045
Messages
5,639,743
Members
417,108
Latest member
Thein Than

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top