Forum Discussion
text to row function
No need to apologize. Here's a sample workbook with the formula.
- PeterBartholomew1May 16, 2024Silver Contributor
The fun starts when one has an entire array of such lists!
MAP really does need considerable improvement to deal with arrays of arrays.
Taking a single cell formula further
= LET( line_break, CHAR(10), sep, {",", ":"}, list, TEXTSPLIT(target, sep, line_break), values, TAKE(WRAPROWS(TOCOL(list), 2), , -1), header, {"Date", "Amount", "Description"}, VSTACK(header, WRAPROWS(values, 3)) )
The attached makes a start at using bisection to build an array of arrays but
1. I have used BYROW because I have yet to implement MAP
2. The helper function was not written for more than one row returned from a given step of BYROW.
I think it is all a bit fragile!
= BYROWλ(targetList, SPLITBOOKINGλ)
- Patrick2788May 16, 2024Silver ContributorI've been accused of authoring "overly complex" formulas so I'd be inclined to copy/paste the text to Word (unformatted text) and then back to Excel and call it a day!
- PeterBartholomew1May 16, 2024Silver Contributor
I have removed the file because it wasn't working correctly.
It is overly complex for any particular problem, but the idea is that for any Lambda helper function that returns the 'nested arrays are not supported' error message from a formula such as
= BYROW(array, Fnλ)
replacing it by
= BYROWλ(array, Fnλ)
should give the array of arrays. I copied the function to this workbook to see what happens when each row returns many rows to be stacked. The outturn is that I have some debugging to do! My preference would be for Microsoft to extend the Lambda helper functions to return arrays of arrays; that would be far more efficient in several ways!
p.s. I think the attached is now working correctly!
Please accept my apologies and ignore this. I was using your problem for testing and formula development purposes.