Forum Discussion
Zdenek_Moravec
Oct 27, 2024Brass Contributor
How to extract multiple occurrences of a text enclosed between two same characters
Dear colleagues, I have a cell with plenty of text. Some part of the text is enclosed between tags >> and <<. The task is to extract all these strings to one cell, separated by new line. Notes ...
- Oct 28, 2024
I hope this works for you (with the text in A5):
=LET(w, TEXTSPLIT(A5, "!"), n, COUNTA(w), s, SEQUENCE(, n), f, FILTER(w, ISEVEN(s)), TEXTJOIN(CHAR(10), TRUE, f))
HansVogelaar
Oct 28, 2024MVP
I hope this works for you (with the text in A5):
=LET(w, TEXTSPLIT(A5, "!"), n, COUNTA(w), s, SEQUENCE(, n), f, FILTER(w, ISEVEN(s)), TEXTJOIN(CHAR(10), TRUE, f))
Zdenek_Moravec
Oct 28, 2024Brass Contributor
HansVogelaar , it works perfect.
Thank You all the team for your effort, the problem is solved.