Distribution of a string into columns without text

baidya91

Board Regular
Joined
Jun 1, 2016
Messages
147
How can I distribute PB4-440-20-560-25-785-30-AGP-875-35-1050-40-GP-1170 of Cell A1 into various columns such as B1, C1, D1, E1, F1, .....etc. without text strings such as AGP, PB4, GP etc.by using excel formula?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi,

Assuming your entry is in A1, array formula** in B1:

=IFERROR(0+LEFT(SUBSTITUTE(MID($A1,SMALL(IF(MMULT(N(ABS({45,52.5}-CODE(MID("-"&$A1,{0,1}+ROW(INDIRECT("1:"&LEN($A1))),2)))<={0,5}),{1;1})=2,ROW(INDIRECT("1:"&LEN($A1)))),COLUMNS($A:A)),99),"-",REPT(" ",99)),99),"")

Copy to the right until you start to get blanks for the results.

Regards


**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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