View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PAL PAL is offline
external usenet poster
 
Posts: 200
Default Cycle Time if in a Specific Year

I am trying to calculate the time between 2 dates, if the latter date
occurred in 2007. Here is where I was going, but it doesn't seem to work.

=IF(H2=YEAR(L2),(H2-E2),"") where L2 has the value 2007.

Also, how would it change if I wanted H2 beween 2 years, ie. 2004-2006.

Thanks.