Delete all white space between the words in one cell

elisa

New Member
Joined
Apr 24, 2002
Messages
7
I know that there is a TRIM function that delete extra space between words in a cell. How do you delete all space in a cell.
ex. "White Space" == "WhiteSpace" Is there a function for it, that is similiar to TRIM function?
Thank you.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
=UPPER(CONCATENATE((TRIM(LEFT(A1,2))),(RIGHT(A1,5))))
eg. ND 10552 = ND10552
This only works if the data you want to keep is in the leftmost two and rightmost five positions in the string. It will turn "White Space" into "WHSPACE" which isn't exactly what Elisa was asking for.

Also, why are you using UPPER?

Still, she'll be deeply moved by the fact that we're still reading her posts after nine years! :LOL:
 
Last edited:
Upvote 0
You can adjust the "2" to the desired length of your strings. Wont work for different lengths. Unless u use a LEN function somehow....lol ya, i saw it this year only!!:ROFLMAO:
 
Upvote 0

Forum statistics

Threads
1,213,482
Messages
6,113,916
Members
448,533
Latest member
thietbibeboiwasaco

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
Back
Top