=CONCATENATE(A1,B1) with leading zero(s)

JMC57

Board Regular
Joined
Apr 24, 2012
Messages
118
How can I modify this formula =CONCATENATE(A1,B1) to allow for up to 5 leading zeros?

Thanks
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Thanks fore your quick response. I made this work by inserting another col. can it be combined in the formula =CONCATENATE(A1,B1) ?
 
Upvote 0
Thanks fore your quick response. I made this work by inserting another col. can it be combined in the formula =CONCATENATE(A1,B1) ?
What oldbrewer was trying to get you to do is use the TEXT function on each of your original cells...

=CONCATENATE(TEXT(A1,"00000"),TEXT(B1,"00000"))

Just so you know, instead of using the CONCATENATE function, you can join text using an ampersand between them, so to join A1 and B1, instead of writing this...

=CONCATENATE(A1,B1)

you can write this instead...

=A1&B1

Applying that to your question, the first formula above (the one I say oldbrewer was trying to lead you to) could be written this way instead...

=TEXT(A1,"00000")&TEXT(B1,"00000")
 
Upvote 0

Forum statistics

Threads
1,216,730
Messages
6,132,402
Members
449,725
Latest member
Enero1

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