View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default search for date in long string of text

To get the date, assuming always two place month and no other use of the /

=MID(A1,FIND("/",A1,1)-2,10)

Vaya con Dios,
Chuck, CABGx3



"ryan00davis" wrote:


ok, ive done a lot of searching and cant seem to come up with what im
looking for.....

i need to be able to pull a date out of a long string of text, the date
is not always in the same place in the string.

for example, here is one of the lines:

TANANA RIVER BRIDGE EA, 4033050001, Berg, David William, 8212813,
06/30/2006, Tim Woster, -

all of this is in one cell.

what i eventually want to do is pull out the date and be able to search
a section of the sheet for the earliest date

the second part of this problem is to make it search the rows up until
the office changes.... for example, there will be a cell that just has
an office name in it and nothing else, it would not be difficult to
locate this cell with an isnumber search function, but how would i make
the search for the date only go up until it sees the previous office. i
was thinking something along the lines of a for loop (i know how they
work in c, but dont know if they exist in excel) that would just say if
previous cell has an earlier date, replace current date in memory with
previous cell, and do this until a cell says one of the office names
(there are only about 15 of them so i could just type all of these
out). but i have no idea how to do a for loop in excel or even if one
exists, but this i could probably search and figure out, the big
problem is pulling out the date

i have no experience with macros, but any and all advice is greatly
appreciated, ive been trying to figure this out for a while.


thanks in advance

ryan


--
ryan00davis
------------------------------------------------------------------------
ryan00davis's Profile: http://www.excelforum.com/member.php...o&userid=37344
View this thread: http://www.excelforum.com/showthread...hreadid=570458