Forum Discussion
Extract mm.yyyy from text
- Jan 22, 2026
=REGEXEXTRACT(A1, "\d{2}\.\d{4}")
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.
- SDj1Jan 23, 2026Copper Contributor
Hi joshaali
Thank you. My version is Excel 365. I have a very huge set of data and I have to extract the dates from it in the format mm.yyyy so I can produce some reports and analyses. I have the dates shown at different places in the cells, some of them are with the month with its name, some have dots as a separator, some have an interval. It is a wild mix. Here is an example:
invoice 2-10747 dated 12.2024.pdf
invoice 2-10846 dated 04.10.2024.pdf
invoice 2-11154 dated 12 December 2024.pdf
invoice 2-11196 dated 16 December 2024.pdf
invoice 2-11339 dated 29 January 2025.pdf
invoice 2-11427 dated 21 February 2025.pdf
dated 31.03.2025 invoice 2-11559.pdf
invoice 2-11567 dated 08 April 2025.pdf
dated 13 May 2025 invoice 2-11706.pdf
invoice 2-11928 dated 19 June 2025.pdf