ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Extract Date from Right Formula (https://www.excelbanter.com/excel-worksheet-functions/99781-extract-date-right-formula.html)

[email protected]

Extract Date from Right Formula
 
I need a formula that will extract the last date from these type of
strings.

07/12/2006 07/12/2006 07/12/2006 07/17/2006 - -

Or

07/12/2006 -

Or

07/07/2006 07/07/2006 - - - -

-Steve

JE McGimpsey

Extract Date from Right Formula
 
One way:

=MID(A1, FIND("^", SUBSTITUTE(A1, "/", "^", LEN(A1) -
LEN(SUBSTITUTE(A1, "/", "")))) - 5, 10)


" wrote:

I need a formula that will extract the last date from these type of
strings.

07/12/2006 07/12/2006 07/12/2006 07/17/2006 - -

Or

07/12/2006 -

Or

07/07/2006 07/07/2006 - - - -

-Steve


[email protected]

Extract Date from Right Formula
 
uh - - - WOW - I don't know how you guys keep coming up with this
stuff, but this worked perfectly the 1st time. Great work, thanks for
the help.

JE McGimpsey wrote:
One way:

=MID(A1, FIND("^", SUBSTITUTE(A1, "/", "^", LEN(A1) -
LEN(SUBSTITUTE(A1, "/", "")))) - 5, 10)



daddylonglegs

Extract Date from Right Formula
 

Another way...

=RIGHT(TRIM(SUBSTITUTE(A1,"-","")),10)

gives a text result, as does previous suggestion. For a true date

=RIGHT(TRIM(SUBSTITUTE(A1,"-","")),10)+0

format as date


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=562280



All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com