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 ...
- Jan 22, 2026
=REGEXEXTRACT(A1, "\d{2}\.\d{4}")
IlirU
Jan 23, 2026Iron Contributor
I used the following formula in cell C2 (see the screenshot above):
=--SUBSTITUTE(TEXTBEFORE(TEXTAFTER(A2:A11, "dated "), ".pdf"), ".", "/")I have formatted the dates in column C as mm.yyyy but you can choose the format you want.
If you want the dates to appear as text, use this formula:
=TEXT(SUBSTITUTE(TEXTBEFORE(TEXTAFTER(A2:A11, "dated "), ".pdf"), ".", "/"), "mm.yyyy")Hope this helps.
IlirU