Search code examples
excelexcel-formulaexcel-2010excel-2007

Microsoft Excel to extract date from another string


Hi Need help in extracting date with the below values

/test/extractDate/agenda/2016/06/09/href.txt||/test/extractDate/agenda/2016/06/09/abc.txt

I need to extract first occurrence of date and month. From the above i need 2016/06 only.

Thanks in advance


Solution

  • This will work:

    =MID(A1,FIND(CHAR(1),SUBSTITUTE(A1,"/",CHAR(1),4))+1,7)