Concatenate 2 cells and separate with 2 hyphens

bristolrob

New Member
Joined
Apr 23, 2018
Messages
34
Ok my friends, i have searched for concatenating 2 cells with hyphens and have found several solutions.
I cannot however see what it is that i am after.
I would like to concatenate 2 values e.g 2453 in cell 1 and 987654321 in cell 2.
I have seen how to do the first hyphen using =CONCATENATE(A1,"-",A2)
I need to put a hyphen between the 2 values and then also hyphens between the first 2 & the next 3 of the second value as so,
2543-98-765-4321.
Your help is always appreciated.
Rob
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
If you have the first value in A1 and the second in B1 try this.

=A1 &"-" & LEFT(B1,2) & "-" & MID(B1,3,3) & "-" & MID(B1,6,4)
 
Upvote 0

Forum statistics

Threads
1,212,933
Messages
6,110,752
Members
448,295
Latest member
Uzair Tahir Khan

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