Joining text with hypen separator

colarguns

New Member
Joined
Jul 2, 2016
Messages
25
Hi all,

I am currently using CONCATENATE(AR3,"/",AS3) to join text, but the end result looks like (Black/ Rust). Is there anyway to bring that Rust in a little bit? I have also tried (AR3&"/"&AS3), but it still keeps the word "Rust" about one space too far to the right.


I have tried with no success.

AR3 = Black
AS3 = Rust
Objective = (Black/Rust)

Thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi,

Don't know why you end up with a space there, you must have leading space in AS3, try this:


Book1
ARASAT
3BlackRustBlack/Rust
Sheet166
Cell Formulas
RangeFormula
AT3=SUBSTITUTE(AR3&"/"&AS3," ","")
 
Upvote 0
Maybe this,
Code:
=SUBSTITUTE(AR3&"/"&AS3," ","")
but it depends on whether the "space" is an actual space OR an imported character, usually Char(160), so you may need
Code:
=SUBSTITUTE(AR3&"/"&AS3,CHAR(160),"")
 
Upvote 0
That worked! I too have no clue where the extra space came from. I checked both cells, and even aligned all text to the left, but still had the space. However, your fix worked. Thank you!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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