ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pull date from cell with text also (https://www.excelbanter.com/excel-programming/431867-pull-date-cell-text-also.html)

Jason

Pull date from cell with text also
 
I have a cell ("A30") on a temporary sheet that contains:
Release Date: 7/30/2009
I want to pull the date from this cell.
I've looked at the Right function but the problem is that the date can
obviously grow or shrink because it is apparently in the m/d/yyyy format.
I've also looked at Find but cant seem to get the right syntax.

Any suggestions would be greatly appreciated!

Mike H

Pull date from cell with text also
 
Hi,

Maybe this

=DATEVALUE(TRIM(MID(A30,FIND(":",A30)+1,255)))

Mike

"Jason" wrote:

I have a cell ("A30") on a temporary sheet that contains:
Release Date: 7/30/2009
I want to pull the date from this cell.
I've looked at the Right function but the problem is that the date can
obviously grow or shrink because it is apparently in the m/d/yyyy format.
I've also looked at Find but cant seem to get the right syntax.

Any suggestions would be greatly appreciated!


Mike H

Pull date from cell with text also
 
Hi,

I forgot I was in the 'programming' group

mydate = DateValue(Trim(Mid(Range("A30"), WorksheetFunction.Find(":",
Range("A30")) + 1, 255)))

Mike

"Mike H" wrote:

Hi,

Maybe this

=DATEVALUE(TRIM(MID(A30,FIND(":",A30)+1,255)))

Mike

"Jason" wrote:

I have a cell ("A30") on a temporary sheet that contains:
Release Date: 7/30/2009
I want to pull the date from this cell.
I've looked at the Right function but the problem is that the date can
obviously grow or shrink because it is apparently in the m/d/yyyy format.
I've also looked at Find but cant seem to get the right syntax.

Any suggestions would be greatly appreciated!


Rick Rothstein

Pull date from cell with text also
 
Will your text part *always* be "Release Date: "? If so,

=MID(A30,15,10)

--
Rick (MVP - Excel)


"Jason" wrote in message
...
I have a cell ("A30") on a temporary sheet that contains:
Release Date: 7/30/2009
I want to pull the date from this cell.
I've looked at the Right function but the problem is that the date can
obviously grow or shrink because it is apparently in the m/d/yyyy format.
I've also looked at Find but cant seem to get the right syntax.

Any suggestions would be greatly appreciated!



Ron de Bruin

Pull date from cell with text also
 

With the text/Date in A1 you can use something like this

=MID(A1,FIND(":",A1,1)+1,255)


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Jason" wrote in message ...
I have a cell ("A30") on a temporary sheet that contains:
Release Date: 7/30/2009
I want to pull the date from this cell.
I've looked at the Right function but the problem is that the date can
obviously grow or shrink because it is apparently in the m/d/yyyy format.
I've also looked at Find but cant seem to get the right syntax.

Any suggestions would be greatly appreciated!


Rick Rothstein

Pull date from cell with text also
 
Or, in VB code...

DateAtEndOfText = Mid(Range("A30").Value, 15)

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Will your text part *always* be "Release Date: "? If so,

=MID(A30,15,10)

--
Rick (MVP - Excel)


"Jason" wrote in message
...
I have a cell ("A30") on a temporary sheet that contains:
Release Date: 7/30/2009
I want to pull the date from this cell.
I've looked at the Right function but the problem is that the date can
obviously grow or shrink because it is apparently in the m/d/yyyy format.
I've also looked at Find but cant seem to get the right syntax.

Any suggestions would be greatly appreciated!




Jason

Pull date from cell with text also
 
Thanks!

The VB codes from Mike and Rick both did the trick, as did Ron's once I
converted it to VB. The different solutions definitely helped me in general,
since I am still a newbie!


All times are GMT +1. The time now is 05:01 AM.

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