I am using Excels 2013 mid and search function to get the date from a comment column but I don't know how to do this to cover the 8 date formats(dd/mm/yyyy, dd/mm/yy and so on). Three of my formulas are below although I would need to join them all together to capture all the date formats.The comment column can be any text with a date anywhere within it.
=MID(A6, SEARCH("??/??/????", A6, 1), 10)
=MID(A7, SEARCH("?/??/????", A7, 1), 9)
=MID(A8, SEARCH("??/?/????", A8, 1), 9)
There must be a better way of doing this as the only way I can think of is to put each formula on a separate column and then use an if statement to show the date. Any help would be much appreciative. thanks
Sample Column data
Paid on 01/01/2017
Paid on 1/01/2017, Reference AAA123
Reference BBB456 Paid on 01/1/2017