Skip to content

ASPLIT

>> Reference, Discussion, & Example Applications:

Splits a column array by a delimiter.

Calls AUNQSRT.

  • ar : required. Column array
  • d : required. String or number delimiter
ASPLIT = LAMBDA(ar, d,
LET(
a, TRIM(ar),
s, SEQUENCE(, MAX(LEN(a))),
x, IFERROR(SEARCH(d, d & a, s), ""),
y, IFERROR(SEARCH(d, a & d, s), ""),
m, AUNQSRT(x, ),
n, AUNQSRT(y, ),
z, IFERROR(TRIM(MID(a, m, n - m)), ""),
IF(ISERROR(--z), z, --z)
)
);