Formula for concat with leading zeros and max total characters

demonfreak

New Member
Joined
Dec 11, 2016
Messages
12
Hello,

I have a problem that I need help with. I have a set of data that contains 3 columns with variable numeral character counts. I need all rows to be concatenated and all 13 digits long (adding leading zeros where necessary.).

Here's an example set of data of what it is currently and what end results I'm looking for.

CL 1CL 2CL 3End Results
1234​
123​
1​
0123400012301
1234​
1234​
2​
0123400123402
1234​
12345​
20​
0123401234520
1234​
123456​
10​
0123412345610

Thank you for any help.
 
Last edited:

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Try

=TEXT(A2,"00000")&TEXT(B2,"000000")&TEXT(C2,"00")

or

=CONCAT(TEXT(A2,"00000"),TEXT(B2,"000000"),TEXT(C2,"00"))
 
Upvote 0

Forum statistics

Threads
1,215,336
Messages
6,124,332
Members
449,155
Latest member
ravioli44

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