troubleshooting Question

Reading static array created by formula?

Avatar of Anthony Mellor
Anthony MellorFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft OfficeMicrosoft Excel
1 Comment1 Solution24 ViewsLast Modified:
So, this creates (what looks like) a static array:
="{"""&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(LET(Count,ROUNDDOWN((LEN(SubA1)-LEN(SUBSTITUTE(SubA1,",","")))/4,0),TEXTJOIN(";""",TRUE,MID(SubA1,FIND("|",SUBSTITUTE(SubA1,",","|",SEQUENCE(1,Count,4,4)))+1,FIND("|",SUBSTITUTE(SubA1&",,,,",",","||",SEQUENCE(1,Count,8,4)))-FIND("|",SUBSTITUTE(SubA1,",","||",SEQUENCE(1,Count,4,4)))-1))),",",CHAR(34)&","&CHAR(34)),"""-","-"),"""0","0")&"}"
and now updated, but does the same thing:
"{"""&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(LET(Count,ROUNDDOWN((LEN(SubA1)-LEN(SUBSTITUTE(SubA1,",","")))/4+1,0),Start,FIND("|",SUBSTITUTE(","&SubA1,",","|",SEQUENCE(Count,,1,4))),Length,FIND("|",SUBSTITUTE(SubA1&",,,,",",","|",SEQUENCE(Count,,4,4)))-Start,TEXTJOIN(""";""",,MID(SubA1,Start,Length))),",",CHAR(34)&","&CHAR(34)),"""-","-"),"""0","0")&"}"


In the form of {"texta","textb","textc",123456;"text1","text3","textf",4567}
A 2d array I think that is called. Length unlimited.
EDIT: Maybe I need to make that clear; the formula creates a static array, but until I paste it as a value, it does not behave like one. I need to refer to it as if it is a static array, even though it is constructed by a formula.

If I copy and paste value it drops nicely in to 4 columns and I can pivot table etc from it. In fact I want to Dynamic Array from it.

However, in it's raw formula form I cannot read it as an array. How to solve this?
As usual without VBA and without manual intervention.

I fear I have fallen foul of a "you can't do that" issue.
I was/am trying to avoid using a very complicated Lambda which does the same job, but is very hard to debug when I make a mistake using it.

This is another question around my long standing attempts to create "a database in one cell" in Excel. Simply, or at least not mega complex.

Anthony

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros