View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jay jay is offline
external usenet poster
 
Posts: 1
Default Help !, to find last 'text' date in text string


Newbie needs help, finding last 'text' date in text string !

I am trying to determine how many days ago (from TODAY or DATE) was a
entry into a 'text' cell made, but I don't know to find the end of the
text and
search backward for the last date.

In the cell are multiple text entries preceeded by the date of the
entry, with the most recent entry appended to the end of the cells
current text string.

The typical text of the cell looks like below (note: the date entry is
always shown as: ", mm/dd/yyyy:")

lots of text,,more text,, , 12/28/2005: lots of text,,more text,,
r
, 12/29/2005: Sent e-mail lots of text,,more text,, r , 12/30/2005:
lots of text,,more text,, r , 1/17/2006: lots of text,,more text,,
,
1/19/2006: lots of text,,more text,, , 1/27/2006: lots of
text,,more text,, , 1/30/2006: lots of text,,more text,, ,
3/1/2006: lots of text,,more text,, , 3/1/2006: lots of
text,,more
text, text end.


I think the pseudo code approach would look similiar to:

dim todaydate as date
dim founddate as ??
dim count as integer

todaydate = date 'get and save todays date

range(the_text_cell).value.select
with selection
.find ( here is where I am lost)
[probably need something here to convert the found date 'text'
value to date type]
count = todaydate - founddate


Thanks for any help you can provide :-)


--
jay
------------------------------------------------------------------------
jay's Profile: http://www.excelforum.com/member.php...fo&userid=2377
View this thread: http://www.excelforum.com/showthread...hreadid=530718