isolate date in text field

NSA0135

New Member
Joined
Mar 15, 2011
Messages
8
Is there a way to find and isolate a date in an excel text field. I have to isolate a date within the text cell and use this date in another type of calucaltion.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

NSA0135

New Member
Joined
Mar 15, 2011
Messages
8
Format is as follows: status changed closed to open: John Smith: 2/23/2011 : failed status update: late posting
 
Upvote 0

MDuff

Well-known Member
Joined
Dec 29, 2002
Messages
529
Office Version
  1. 365
Platform
  1. Windows
Kinda made this one ourt of some toher posts may be a better way but seemed to work
Excel Workbook
AB
1status changed closed to open: John Smith: 2/23/2011 : failed status update: late posting2/23/2011
Sheet1
Excel 2007
Cell Formulas
RangeFormula
B1=DATEVALUE((LEFT(MID(MID(MID(SUBSTITUTE(A1," ","^",7),1,256),FIND("^",SUBSTITUTE(A1," ","^",7)),256),2,FIND(" ",MID(MID(SUBSTITUTE(A1," ","^",7),1,256),FIND("^",SUBSTITUTE(A1," ","^",7)),256))),9)))
 
Upvote 0

meldoc

Well-known Member
Joined
Jul 18, 2009
Messages
1,249
Hello and welcome

Or maybe this, there will definitely be better than this. :biggrin:
Excel Workbook
AB
1status changed closed to open: John Smith: 23/02/2011 : failed status update: late posting23/02/2011
Sheet1
Excel 2007
Cell Formulas
RangeFormula
B1=MID(A1,MIN(SEARCH({0;1;2;3;4;5;6;7;8;9},A1&1234567890)),SEARCH(" ",A1,MIN(SEARCH({0;1;2;3;4;5;6;7;8;9},A1&1234567890)))-MIN(SEARCH({0;1;2;3;4;5;6;7;8;9},A1&1234567890)))+0
 
Upvote 0

T. Valko

Well-known Member
Joined
May 9, 2009
Messages
16,623
Format is as follows: status changed closed to open: John Smith: 2/23/2011 : failed status update: late posting
Try this...

=LOOKUP(1E100,--MID(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")),ROW(INDIRECT("1:"&LEN(A2)))))

Format as Date.
 
Upvote 0

Haseeb Avarakkan

Well-known Member
Joined
Sep 28, 2010
Messages
902
Office Version
  1. 365
Platform
  1. Windows
Just a change in the T.Valko's formula to avoid INDIRECT volatile function :)

=LOOKUP(1E+100,--MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),{1,2,3,4,5,6,7,8,9,10}))
 
Upvote 0

T. Valko

Well-known Member
Joined
May 9, 2009
Messages
16,623
Just a change in the T.Valko's formula to avoid INDIRECT volatile function :)

=LOOKUP(1E+100,--MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),{1,2,3,4,5,6,7,8,9,10}))
That's a generic formula to find any number in a string.

Since this request is specifically for the DATE, and assuming that there are no other numbers in the string, then we might be able to use something as simple as:

=--TRIM(MID(A2,FIND("/",A2)-2,10))

That works on the sample string that was posted.
 
Upvote 0

NSA0135

New Member
Joined
Mar 15, 2011
Messages
8
Thank you all. The next to last entry was the item which worked form and has saved me several hours of reviewing each cell. :)
 
Upvote 0

Forum statistics

Threads
1,191,558
Messages
5,987,274
Members
440,087
Latest member
Ruppert23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top