1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

How to use TEXTSPLIT() on a range?

Our take

To effectively use the TEXTSPLIT() function on a range, it's important to understand its limitations within specific contexts. When you attempt to apply TEXTSPLIT() to each row of a range using BYROW, you may encounter issues because TEXTSPLIT expects a single string, not an array. To achieve a dynamic 6-row by 4-column array from your example, consider using a combination of SEQUENCE and INDEX to extract and split each element correctly. This method ensures that each row is processed individually, yielding the desired output efficiently.

Suppose I have a 6-row x 1-col array -- in A1:A6, say -- where each cell contains a sequence of four letters separated by commas. For example:

A1="a,b,c,d"
A2="e,f,g,h"
...
A6="u,v,w,x"

I want to produce from that a 6-row x 4-col dynamic array where each row consists of what you'd get if you ran TEXTSPLIT(<cell>,",") on each cell in the original array.

Why does this not work:

=BYROW(A1:A6, LAMBDA(row, TEXTSPLIT(row,",")))

And how should it be done?

submitted by /u/TeeMcBee
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Tagged with