spaces after data, how to remove it?

3nduranc3

New Member
Joined
May 27, 2013
Messages
17
Hey all!

I have a little problem while trying to use CONCATENATE. Namely. in the first row after data cells, I have random spaces. So after using the function they look like this.

Example:

abcdfe ______ abbbfff
abcdfe ___oilpo
freterezlzo_____________________ loaidf

So the spaces are in the first cell, is there a function I can remove them? all formats are text. And I would like to have only 1 space after concatenate between the two datas.

Thank you very much!

Ambrus
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
try to modified your formula in concatenate:
=CONCATENATE(TRIM(A1),TRIM(B1))
this will remove trailing spaces in either A1 & B1
 
Upvote 0
Ambrus,

Eg If your formula is =A1&A2

Then try =TRIM(A1)&TRIM(A2)

Hope that helps.
 
Upvote 0
Hi

You can also use the "Clean" function to remove any non printable characters. Then add the Substitute to remove carriage returns. Yes you can use all of them in the same formula.

=TRIM(CLEAN(SUBSTITUTE(A1,CHAR(13),"")))
 
Upvote 0

Forum statistics

Threads
1,217,413
Messages
6,136,474
Members
450,015
Latest member
excel_beta_345User

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