Forum Discussion
tibbyjudy
Mar 18, 2022Copper Contributor
Extract all consecutive 3-letter strings from text cell
I need a formula to extract all consecutive 3-letter strings from cells with varying lengths of text, then aggregate them, separated by slashes. In the example below, the column on the left is the data I'm starting with, and the column on the right is what I need to end up with. This example was done manually.
| Ainsworth | ain/ins/nsw/swo/wor/ort/rth |
| Bandon | ban/and/ndo/don |
| Devils Lake | dev/evi/vil/ils/lsl/sla/lak/ake |
- =TEXTJOIN("/",,LOWER(MID(SUBSTITUTE(A1," ",""),ROW(INDIRECT("1:"&LEN(SUBSTITUTE(A1," ",""))-2)),3)))
**You can change A1 as you need.
2 Replies
- Starrysky1988Iron Contributor=TEXTJOIN("/",,LOWER(MID(SUBSTITUTE(A1," ",""),ROW(INDIRECT("1:"&LEN(SUBSTITUTE(A1," ",""))-2)),3)))
**You can change A1 as you need.- tibbyjudyCopper ContributorThank you! Works perfectly.