Combine cells in specific format

spectraflame

Well-known Member
Joined
Dec 18, 2002
Messages
815
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
 

Some videos you may like

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,413
Office Version
  1. 365
Platform
  1. Windows
Do you mean a formula like this (for row 2):
=TEXT(A2,"000")&"-"&TEXT(B2,"000000")&"-"&TEXT(C2,"00")
 

Watch MrExcel Video

Forum statistics

Threads
1,118,383
Messages
5,571,818
Members
412,420
Latest member
Quintankerus
Top