Split Bracketed Text Across Columns

NorthbyNorthwest

Board Regular
Joined
Oct 27, 2013
Messages
154
Office Version
  1. 365
Hi, everyone. Hope someone can help. I have a column in which each cell contains one, two, three or more bracketed sets of numbers. Example: [2784][7115][3412]. No spaces between the brackets. I need to break these bracketed numbers out into individual column cells, preferably with brackets removed. But brackets remaining is OK too. I have been working with new TEXTSPLIT" function without success. Does anyone know of a formula which would accomplish this?
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
I have not used these functions before.
The following may help.

TextBefore.xlsm
ABCDE
1
2 [2784][7115][3412]278471153412
3 [2784][7115]27847115
4
1b
Cell Formulas
RangeFormula
C2:F2,C3:E3C2=IFERROR(TEXTAFTER(TEXTSPLIT(B2,"]"),"["),"")
Dynamic array formulas.
 
Upvote 0
TextBefore.xlsm
ABCDEF
1
2[2784][7115][3412]278471153412
3[2784][7115]27847115
4[2784][7115][3412]278471153412
5[3412]3412
6[2784][7115][3412][1234]2784711534121234
7[2784][7115][3412][]278471153412
8
1b
Cell Formulas
RangeFormula
C2:E2,C6:F7,C5,C4:E4,C3:D3C2=TEXTAFTER(TEXTSPLIT(B2,"]",0,1),"[",,1,1)
Dynamic array formulas.
 
Upvote 0
Solution
TextBefore.xlsm
ABCDEF
1
2[2784][7115][3412]278471153412
3[2784][7115]27847115
4[2784][7115][3412]278471153412
5[3412]3412
6[2784][7115][3412][1234]2784711534121234
7[2784][7115][3412][]278471153412
8
1b
Cell Formulas
RangeFormula
C2:E2,C6:F7,C5,C4:E4,C3:D3C2=TEXTAFTER(TEXTSPLIT(B2,"]",0,1),"[",,1,1)
Dynamic array formulas.
Have a go with:

Excel Formula:
=DROP(IFERROR(--REDUCE(0,B2:B7,LAMBDA(a,b,VSTACK(a,TEXTSPLIT(b,{"[","]"},,1)))),""),1)

TEXTSPLIT() take an array of delimiters. Also, it's quite unfortunate that it won't spill over different lengths when applied to a range (would just return the 1st element). Therefor we can apply the above trick with REDUCE(). The double unary is applied to return numeric data. Remove these if need be.
 
Upvote 0
Another option
Excel Formula:
=TEXTSPLIT(B2,{"[","]"},,1)
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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