Make a formula spill

Stephen_IV

Well-known Member
Joined
Mar 17, 2003
Messages
1,168
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Good morning, the formula below is doing exactly what I need, except, How do I make it spill?? Any help would be appreciated.

Dynamic Array Split Schools.xlsm
ABCD
1TWINS , ASTROS , BOSTONTWINS ASTROS BOSTON
2DODGERS , BOSTONDODGERS DODGERS BOSTON
3DODGERS , BOSTONDODGERS DODGERS BOSTON
4DODGERS , BOSTONDODGERS DODGERS BOSTON
5ROYALS , RANGERSROYALS ROYALS RANGERS
6TWINS , ASTROS , BOSTONTWINS ASTROS BOSTON
7DODGERS , BOSTONDODGERS DODGERS BOSTON
8ANGELS , YANKEESANGELS ANGELS YANKEES
Sheet2
Cell Formulas
RangeFormula
B1:D8B1=LET( SplitArray, TEXTSPLIT(A1, ","), WordCount, COUNTA(SplitArray), IF( WordCount = 2, CHOOSE({1,2,3}, INDEX(SplitArray, 1), INDEX(SplitArray, 1), INDEX(SplitArray, 2)), IF( WordCount = 3, CHOOSE({1,2,3}, INDEX(SplitArray, 1), INDEX(SplitArray, 2), INDEX(SplitArray, 3)), {"","",""} ) ) )
Dynamic array formulas.
 

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 don't understand your question. You have a formula in column B and it is spilling into columns C and D.

What is the result you want to see?
 
Upvote 0
Thanks for responding. I would like the whole range to spill not just the row.
 
Upvote 0
How about
Excel Formula:
=DROP(REDUCE("",A1:A8,LAMBDA(x,y,LET(SplitArray, TRIM(TEXTSPLIT(y, ",")),WordCount, COUNTA(SplitArray),VSTACK(x,IF(WordCount = 2,CHOOSECOLS(SplitArray,1,1,2),IF(WordCount = 3,SplitArray,{"","",""})))))),1)
 
Upvote 0
Thanks again Fluff! That is exactly what I am looking for!! Have a great day!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
I see. Now that I have tried Fluff's formula, I see that you want to use just one formula instead of one formula per row.
 
Upvote 0
Another variation

23 08 20.xlsm
ABCD
1TWINS , ASTROS , BOSTONTWINSASTROSBOSTON
2DODGERS , BOSTONDODGERSDODGERSBOSTON
3DODGERS , BOSTONDODGERSDODGERSBOSTON
4DODGERS , BOSTONDODGERSDODGERSBOSTON
5ROYALS , RANGERSROYALSROYALSRANGERS
6TWINS , ASTROS , BOSTONTWINSASTROSBOSTON
7DODGERS , BOSTONDODGERSDODGERSBOSTON
8ANGELS , YANKEESANGELSANGELSYANKEES
Split & spill
Cell Formulas
RangeFormula
B1:D8B1=TEXTSPLIT(REPLACE(REDUCE("",A1:A8,LAMBDA(a,b,a&"|"&IF(COLUMNS(TEXTSPLIT(b,","))=2,SUBSTITUTE(b,",",", "&LEFT(b,FIND(",",b)),1),b))),1,1,"")," , ","|")
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,208
Messages
6,123,644
Members
449,111
Latest member
ghennedy

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