Forum Discussion
dipankar_de
Nov 12, 2022Copper Contributor
Using TEXTSPLIT without copy-fill-down
Hello All, I am trying to split "; " separated range of text into columns. The intent is to use one single spill-formula (instead of copy-fill-down) to address each text in the range. I have...
dscheikey
Nov 12, 2022Bronze Contributor
At first I thought that this could be solved quite simply with TEXTSPLIT() within BYROW(). But that always resulted in a CALC# error.
I then solved this rather oldscool with MID() SEARCH() and SEQUENCE().
There are probably other variants.
=LET(
in,SUBSTITUTE("; "&Table2[Values]&"; "," ",""),
maxi,MAX(LEN(in)-LEN(SUBSTITUTE(in,";","")))-1,
start,SEARCH(CHAR(124),SUBSTITUTE(in,";",CHAR(124),SEQUENCE(1,maxi,1))),
end,SEARCH(CHAR(124),SUBSTITUTE(in,";",CHAR(124),SEQUENCE(1,maxi,2))),
HSTACK(Table2['#],IFERROR(MID(in,start+1,end-start-1),"")))
I hope that's OK for you.