break concatenate

johnny52

Active Member
Joined
Oct 13, 2006
Messages
323
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
In cell a1 I have a concatenate formula with this result 1-2-10-12

I would like to break that out to col b ,col c, col d and col e showing them as separate individual numbers
b1=1 c1=2 d1=10 and e1 =12

at times these numbers will change so I want to accommodate a two digit or one digit scenario like if this 20-3-8-1 occurs.

Is there a left mid right formula to do this

Thanks everbody :)
 

Some videos you may like

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.

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
5,428
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Use B1 formula if you want the results converted to Real numbers.

Use B9 formula if you may have Leading zeros that you want preserved, result is Text.

Either formula copied across:

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style=";">1-2-10-12</td><td style="text-align: right;;">1</td><td style="text-align: right;;">2</td><td style="text-align: right;;">10</td><td style="text-align: right;;">12</td><td style=";"></td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style=";">20-3-8-1</td><td style="text-align: right;;">20</td><td style="text-align: right;;">3</td><td style="text-align: right;;">8</td><td style="text-align: right;;">1</td><td style=";"></td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style=";">11-22-33-44</td><td style="text-align: right;;">11</td><td style="text-align: right;;">22</td><td style="text-align: right;;">33</td><td style="text-align: right;;">44</td><td style=";"></td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style=";">5-6-7-8</td><td style="text-align: right;;">5</td><td style="text-align: right;;">6</td><td style="text-align: right;;">7</td><td style="text-align: right;;">8</td><td style=";"></td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style=";">999-111-222-333</td><td style="text-align: right;;">999</td><td style="text-align: right;;">111</td><td style="text-align: right;;">222</td><td style="text-align: right;;">333</td><td style=";"></td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style=";">1-22-333-4444-55555-666666</td><td style="text-align: right;;">1</td><td style="text-align: right;;">22</td><td style="text-align: right;;">333</td><td style="text-align: right;;">4444</td><td style="text-align: right;;">55555</td><td style="text-align: right;;">666666</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">7</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">8</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">9</td><td style=";">1-02-10-12</td><td style="text-align: right;;">1</td><td style="text-align: right;;">02</td><td style="text-align: right;;">10</td><td style="text-align: right;;">12</td><td style=";"></td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">10</td><td style=";">20-3-08-1</td><td style="text-align: right;;">20</td><td style="text-align: right;;">3</td><td style="text-align: right;;">08</td><td style="text-align: right;;">1</td><td style=";"></td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">11</td><td style=";">11-22-33-044</td><td style="text-align: right;;">11</td><td style="text-align: right;;">22</td><td style="text-align: right;;">33</td><td style="text-align: right;;">044</td><td style=";"></td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">12</td><td style=";">05-6-7-8</td><td style="text-align: right;;">05</td><td style="text-align: right;;">6</td><td style="text-align: right;;">7</td><td style="text-align: right;;">8</td><td style=";"></td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">13</td><td style=";">999-00111-222-00333</td><td style="text-align: right;;">999</td><td style="text-align: right;;">00111</td><td style="text-align: right;;">222</td><td style="text-align: right;;">00333</td><td style=";"></td><td style=";"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">14</td><td style=";">1-22-333-4444-55555-666666</td><td style="text-align: right;;">1</td><td style="text-align: right;;">22</td><td style="text-align: right;;">333</td><td style="text-align: right;;">4444</td><td style="text-align: right;;">55555</td><td style="text-align: right;;">666666</td></tr></tbody></table><p style="width:6.4em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet651</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B1</th><td style="text-align:left">=IFERROR(<font color="Blue">MID(<font color="Red">SUBSTITUTE(<font color="Green">$A1,"-",REPT(<font color="Purple">" ",100</font>)</font>),COLUMNS(<font color="Green">$B1:B1</font>)*100-99,100</font>)+0,""</font>)</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B9</th><td style="text-align:left">=TRIM(<font color="Blue">MID(<font color="Red">SUBSTITUTE(<font color="Green">$A9,"-",REPT(<font color="Purple">" ",100</font>)</font>),COLUMNS(<font color="Green">$B9:B9</font>)*100-99,100</font>)</font>)</td></tr></tbody></table></td></tr></table><br />
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
5,428
Office Version
  1. 2016
Platform
  1. Windows
You're welcome.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,078
Messages
5,599,632
Members
414,326
Latest member
kfg1287

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
Top