# Concatenate 2 cells and separate with 2 hyphens

#### bristolrob

##### New Member
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.
Rob

### Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

#### steve the fish

##### Well-known Member
You can do this:

=TEXT(A1&B1,"0000-00-000-0000")

#### Norie

##### Well-known Member
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)

#### bristolrob

##### New Member
Many thanks, that works perfectly
Rob

Replies
3
Views
162
Replies
3
Views
234
Replies
1
Views
131
Replies
6
Views
175
Replies
6
Views
115

1,136,314
Messages
5,675,018
Members
419,543
Latest member
Casp

### 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.

### Which adblocker are you using?

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

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