View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
al al is offline
external usenet poster
 
Posts: 363
Default Extracting dates from a String

Try for start date:
=MID(A1,FIND("period",A1)+7,(FIND("to",A1))-(FIND("period",A1)+8))

Stop date:
=MID(A1,FIND("to",A1)+3,(FIND("-",A1))-(FIND("to",A1)+4))


HTH


"Raj" wrote:

Hi,

Cells in Column A have strings of the following type:
eg A1:
Billing for the period March 14 2009 to March 13 2010 - Order dated
April 01 2009
In B1 I want the date : 14-Mar-2009
In C1 I want the date: 13-Mar-2010
(to elaborate, only the first two dates in the string need to be
extracted, third and subsequent dates in the string to be ignored)

Thanks in advance for the help.

Regards,
Raj