Merging numbers with semicolon separation

jlugo

Board Regular
Joined
Aug 12, 2011
Messages
146
HI

Here's my challenge:

#1 - Digits must retain 4 digit value
#2 - I need to merge them into one row separated by semicolon ";"

0028
0298
0357
0387
0524

<COLGROUP><COL style="WIDTH: 48pt" width=64><TBODY>
</TBODY>

DESIRED GOAL - 0028;00298;0357;0387;0524

How do I do this w/out use of VBA code?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Assuming the data is in col"A"
Try
Code:
=A1&";"&A2&";"&A3&";"&A4&";"&A5
 
Upvote 0
If have 93 columns of 4 digit #s. I may consider a macro if there isn't a fast way to drag to the end.
 
Upvote 0
If have 93 columns of 4 digit #s. I may consider a macro if there isn't a fast way to drag to the end.
Here's a fast way to drag to the end. Drag formula in B2.
Excel Workbook
AB
1
200280028
302980028;0298
403570028;0298;0357
503870028;0298;0357;0387
605240028;0298;0357;0387;0524
Sheet4
 
Upvote 0
Thank you Michael!

Thank you Joe! This dragging down only works until the 53rd row. All other rows from 54th row to 93rd show #VALUE! error.
 
Upvote 0
Thank you Michael!

Thank you Joe! This dragging down only works until the 53rd row. All other rows from 54th row to 93rd show #VALUE! error.
Sorry, forgot that concatenate function limits the number of arguments. Anyway, it's not needed. Try this instead:

=IF(B1="",A2,TEXT(B1,"0000")&";"&TEXT(A2,"0000"))

and drag down
 
Upvote 0
Hi Joe,

I tried this and results added some odd zeros. First formula was closest to what I was looking for.
Execute and see for yourself comes out odd. I appreciate your help.
 
Upvote 0
Hi Joe,

I tried this and results added some odd zeros. First formula was closest to what I was looking for.
Execute and see for yourself comes out odd. I appreciate your help.
I started with your posted data with the numbers custom formatted as "0000". Below is with last formula I posted and column B right aligned.
Excel Workbook
AB
1
200280028
302980028;0298
403570028;0298;0357
503870028;0298;0357;0387
605240028;0298;0357;0387;0524
Sheet4
 
Upvote 0

Forum statistics

Threads
1,215,343
Messages
6,124,402
Members
449,156
Latest member
LSchleppi

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