Forum Discussion
TEXTSPLIT with multiple Occurances
- Aug 29, 2024
That could be
=ARRAYTOTEXT(TOROW(TEXTAFTER(TEXTBEFORE(TEXTSPLIT(A1,"{"), "Mhz" ),","),3))if you are on Excel 365
anupambit1797 One more variant to add to the mix:
=BYROW(A1:A2101, LAMBDA(r, ARRAYTOTEXT(DROP(TEXTAFTER(TEXTSPLIT(r, "Mhz/"), ", ", -1),, -1))))
If you don't like the extra space added to the delimiter by ARRAYTOTEXT, use TEXTJOIN instead:
=BYROW(A1:A2101, LAMBDA(r, TEXTJOIN(",",, DROP(TEXTAFTER(TEXTSPLIT(r, "Mhz/"), ", ", -1),, -1))))
Cheers!
Thanks djclements , I tried to use both of them, but in my spread sheet it's giving me #SPILL! err
Thanks & Regards,
Anupam Shrivastava
- djclementsAug 30, 2024Silver Contributor
anupambit1797 My variant was written to work with your sample file, which did not contain a table. Since your actual data appears to be formatted as a structured Excel table, the BYROW function will not work. Instead, just reference "This Row" of the "Merged" column:
=ARRAYTOTEXT(DROP(TEXTAFTER(TEXTSPLIT([@Merged], "Mhz/"), ", ", -1),, -1)) //OR =TEXTJOIN(",",, DROP(TEXTAFTER(TEXTSPLIT([@Merged], "Mhz/"), ", ", -1),, -1))Most of the formulas shared on this thread will return the same results for the sample data you've provided, so it really comes down to personal preference. Cheers!