Combine cells in specific format

spectraflame

Well-known Member
Joined
Dec 18, 2002
Messages
829
Office Version
  1. 365
Platform
  1. Windows
I have the follow columns of numbers. I need to combine them in a specific format like ###-######-##. How would I go about doing this? In the case where there is only a single number like column c or 5 numbers like column D, a "0" would be the leading number.
Incode Customers 11-16-05.xls
ABCD
220100483
380301340
4160404241
5160404241
6160404540
7160404540
8160404540
9160404750
10170500226
11170500226
12180503773
13180503773
14300902918
153009029698
16300903022
17300903073
1833010029598
Sheet1
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Do you mean a formula like this (for row 2):
=TEXT(A2,"000")&"-"&TEXT(B2,"000000")&"-"&TEXT(C2,"00")
 
Upvote 0
That is exactly what I was looking for.

Thanks for the quick response.

Matthew
 
Upvote 0

Forum statistics

Threads
1,216,172
Messages
6,129,292
Members
449,498
Latest member
Lee_ray

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