G
goldcup
Hi,
I'm trying to grab and use the dates from thousands of cells of text.
I think I'm making this too complicated.
My horrible formula, so far, sort of reports on dates that use "/"
and I can tell I'm going in the wrong direction with it.
There is very little consistency in the text length or date.
I've been looking at this for too long.
Does anyone have any advice, please?
=IF(OR(RIGHT(MID(SUBSTITUTE(MID(A1,SEARCH("/"&"*"&"/0",
A1,1)+3,8),"0",""),1,7))="/",RIGHT(MID(SUBSTITUTE(MID(A1,SEARCH("/"&"*"&"/0",
A1,1)+3,8),"0",""),1,7))="
"),MID(SUBSTITUTE(MID(A1,SEARCH("/"&"*"&"/0",
A1,1)+3,8),"0",""),1,6),MID(SUBSTITUTE(MID(A1,SEARCH("/"&"*"&"/0",
A1,1)+3,8),"0",""),1,8))
it reports back 1/4/5
(rather than a format that can be date formatted 1/4/05)
Text is in Cell A1
Sample text variety:
1)
blah /blah blah-blah blah m/d/yy blah blah blah blah blah
2)
blah blah/ blah blah blah mm/dd/yy blah blah /blah blah blah
3)
blah - blah blah /blah m-dd-yy blah
4)
blah blah blah blah blah mm-d-yy
I haven't found any that use yyyy format or dd-mm-yy
Thank you
I'm trying to grab and use the dates from thousands of cells of text.
I think I'm making this too complicated.
My horrible formula, so far, sort of reports on dates that use "/"
and I can tell I'm going in the wrong direction with it.
There is very little consistency in the text length or date.
I've been looking at this for too long.
Does anyone have any advice, please?
=IF(OR(RIGHT(MID(SUBSTITUTE(MID(A1,SEARCH("/"&"*"&"/0",
A1,1)+3,8),"0",""),1,7))="/",RIGHT(MID(SUBSTITUTE(MID(A1,SEARCH("/"&"*"&"/0",
A1,1)+3,8),"0",""),1,7))="
"),MID(SUBSTITUTE(MID(A1,SEARCH("/"&"*"&"/0",
A1,1)+3,8),"0",""),1,6),MID(SUBSTITUTE(MID(A1,SEARCH("/"&"*"&"/0",
A1,1)+3,8),"0",""),1,8))
it reports back 1/4/5
(rather than a format that can be date formatted 1/4/05)
Text is in Cell A1
Sample text variety:
1)
blah /blah blah-blah blah m/d/yy blah blah blah blah blah
2)
blah blah/ blah blah blah mm/dd/yy blah blah /blah blah blah
3)
blah - blah blah /blah m-dd-yy blah
4)
blah blah blah blah blah mm-d-yy
I haven't found any that use yyyy format or dd-mm-yy
Thank you