concatenate digits begining with zero and show the result with zero.

anilsharaf

New Member
Joined
Apr 8, 2014
Messages
41
Office Version
  1. 2007
Platform
  1. Windows
how should I concatenate the following. Plz show me the way. Thanks in advance. there is a long list of data. This is a sample only.

t1t2t3when concatenated it shows thisI want this
A16321043001A16/321043/1A16/321043/001
A16321043011A16/321043/11A16/321043/011
A16321043123A16/321043/123A16/321043/123

<colgroup><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 

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
how should I concatenate the following. Plz show me the way. Thanks in advance. there is a long list of data. This is a sample only.

t1t2t3when concatenated it shows thisI want this
A16321043001A16/321043/1A16/321043/001
A16321043011A16/321043/11A16/321043/011
A16321043123A16/321043/123A16/321043/123

<colgroup><col><col><col><col span="2"></colgroup><tbody>
</tbody>
Are the cells containing those numbers with leading zeroes formatted as Text or Custom Formatted with 000?
 
Upvote 0
Here is another formula you can try...

=A1&TEXT(B1,"\/00000\/")&TEXT(C1,"000")

The above formula assumes your numbers in Columns B could possibly begin with zero. If that is not the case, then you could use this instead...

=A1&"/"&B1&TEXT(C1,"\/000")
 
Last edited:
Upvote 0
Solution
1.

=A2&"/"&B2&"/"&IF(ISNUMBER(C2),TEXT(C2,"000"),C2)

If any cell is empty in A2:C2, we would need to adapt the formula for that.

2.

If you have the TEXTJOIN function on your system:

=TEXTJOIN("/",TRUE,A2:B2)&IF(C2="","","/"&IF(ISNUMBER(C2),TEXT(C2,"000"),C2))
 
Upvote 0
Colm t1 and t2 are formated as text and colm t3 is custom formatted "000" and Ur 2nd Formula worked Fine. Many many Thanks.
 
Last edited:
Upvote 0
Why the ISNUMBER test? It seems that the TEXT function will take a text-number and convert it to a real number in order to apply the number format to it.

Yes, it does, so the ISNUMBER test can be dropped...

=TEXTJOIN("/",TRUE,A2:B2)&IF(C2="","","/"&TEXT(C2,"000"))
 
Upvote 0

Forum statistics

Threads
1,214,515
Messages
6,119,974
Members
448,934
Latest member
audette89

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