R Rodrigues Member Mar 1, 2016 #1 Hello All On column B (file attached) I need to look at the column I and display the date using format: 02-03-16 (ignoring the text before the date). On column I, have added some variances as isn't always the same. Many thanks in advance. R Attachments Book1.xlsx 10.9 KB · Views: 12
Hello All On column B (file attached) I need to look at the column I and display the date using format: 02-03-16 (ignoring the text before the date). On column I, have added some variances as isn't always the same. Many thanks in advance. R
Khalid NGO Excel Ninja Mar 1, 2016 #2 Hi Rodrigues, Based on your posted samples, Try: =IF(ISERROR(FIND("END",I2)),--TRIM(RIGHT(I2,9)),EOMONTH(--TRIM(RIGHT(I2,9)),0)) OR =IFERROR(MID(I2,SEARCH("??-??-??",I2),8)+0,EOMONTH(--TRIM(SUBSTITUTE(I2,"END","")),0)) Regards,
Hi Rodrigues, Based on your posted samples, Try: =IF(ISERROR(FIND("END",I2)),--TRIM(RIGHT(I2,9)),EOMONTH(--TRIM(RIGHT(I2,9)),0)) OR =IFERROR(MID(I2,SEARCH("??-??-??",I2),8)+0,EOMONTH(--TRIM(SUBSTITUTE(I2,"END","")),0)) Regards,
Khalid NGO Excel Ninja Mar 1, 2016 #3 You may find this useful: http://chandoo.org/wp/2012/08/17/extract-dates-from-text/ See the comments for various ideas.
You may find this useful: http://chandoo.org/wp/2012/08/17/extract-dates-from-text/ See the comments for various ideas.
B bosco_yip Excel Ninja Mar 1, 2016 #4 or, =IFERROR(0+RIGHT(I2,8),EOMONTH(0+SUBSTITUTE(I2,"END ",),0)) Regards Bosco
R Rodrigues Member Mar 2, 2016 #5 Khalid NGO said: Hi Rodrigues, Based on your posted samples, Try: =IF(ISERROR(FIND("END",I2)),--TRIM(RIGHT(I2,9)),EOMONTH(--TRIM(RIGHT(I2,9)),0)) OR =IFERROR(MID(I2,SEARCH("??-??-??",I2),8)+0,EOMONTH(--TRIM(SUBSTITUTE(I2,"END","")),0)) Regards, Click to expand... Thanks R
Khalid NGO said: Hi Rodrigues, Based on your posted samples, Try: =IF(ISERROR(FIND("END",I2)),--TRIM(RIGHT(I2,9)),EOMONTH(--TRIM(RIGHT(I2,9)),0)) OR =IFERROR(MID(I2,SEARCH("??-??-??",I2),8)+0,EOMONTH(--TRIM(SUBSTITUTE(I2,"END","")),0)) Regards, Click to expand... Thanks R