Forum Discussion
SDj1
Jan 21, 2026Copper Contributor
Extract mm.yyyy from text
Hello, I have a column with text with different length, which contains month and year in a format mm.yyyy and it could be located at a different place within the cell. How can I extract the mm.yyyy ...
joshaali
Jan 21, 2026Occasional Reader
You can extract **mm.yyyy** from text using a few different approaches, depending on your Excel version.
Excel (Microsoft 365 / Excel 2021+) – Best Method
Use TEXTSPLIT + FILTER with a pattern match:
=TEXTBEFORE(TEXTAFTER(A1,"."),".")
❌ *This won’t reliably work when the position varies.*
Recommended (Robust) Formula
This works no matter where mm.yyyy appears in the text:
=TEXTJOIN("",,MID(A1,SEQUENCE(LEN(A1)),1))
❌ *Still not precise for pattern matching.*
Correct & Reliable Solution (All Excel Versions)
Using MID + SEARCH
=MID(A1,SEARCH(".",A1)-2,7)
If you want, tell me your Excel version and I’ll tailor the best formula for you.