A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Hi,
If your Excel does not support the REGEXEXTRACT function, and you are using Excel 2021 (updated) or a newer version of Excel (such as Excel 365 or Excel 2024), then you can try the following formula:
=LET(
d, SORT(A2:A22), seq, SEQUENCE(, 10, 0),
s, SORT(HSTACK(BYROW(d, LAMBDA(a, MID(a, 1, MIN(TOROW(SEARCH(seq, a), 3) - 1)))),
BYROW(d, LAMBDA(a, MID(a, MIN(TOROW(SEARCH(seq, a), 3)), LEN(a))))), {1,2}),
CONCATENATE(TAKE(s,, 1), TAKE(s,, -1))
)
Hope it helps.