Re: Cycle Time if in a Specific Year



If you are struggling to see what is happening in a formula, you could
always break it down into manageable chunks until you can see what's going
on.

If you look at =YEAR(2007) it will return the value 1905, because when you
treat the number 2007 as a date (by using it as the input to the YEAR
function) then it is interpreted as 29th June 1905 (2007 days after the
beginning of 1900). If you'd forgotten what the YEAR function does, you can
look it up in Excel help.
If you are trying to test whether a date in H2 is in 2007, it looks as if
you want to change your formula to
=IF(YEAR(H2)=L2,H2-E2,"")
If you want to test whether H2 falls within your 3 year range (2004 to
2006), then you could use
=IF(AND(YEAR(H2)>=2004,YEAR(H2)<=2006),H2-E2,"")
[or you could put 2004 and 2006 in cells and use the relevant cell
references in the formula, as you did for 2007 in L2]
--
David Biddulph

"PAL" <PAL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7DF1619C-72E2-4BBF-8B21-0C0A2908F062@xxxxxxxxxxxxxxxx
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.


.



Relevant Pages

  • Re: Formula issue with the "OR" command
    ... If you're struggling with debugging, it's usually best to break your formula ... into manageable chunks. ... David Biddulph ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Conditional Formatting
    ... manageable chunks, and if you want us to help you'll have to tell us what ... David Biddulph ... those string tests are not case sensitive, so you don't need the pairs. ... If you are struggling with one of those individual parts, ...
    (microsoft.public.excel.misc)
  • Re: Stumped
    ... misbehaving) is to break it down into manageable chunks and see how each ... ignore a formula including the string "Kirkby Thore"!] ... "David Biddulph" wrote: ... being daft and missing something in Excel where three criteria is done ...
    (microsoft.public.excel.misc)
  • Re: Really need to do this!
    ... the best bet is to break it down into manageable chunks. ... in which omit the quotes around "000" in my ... David Biddulph ... just get a zero "0". ...
    (microsoft.public.excel.worksheet.functions)
  • Re: XML::LibXML navigation
    ... I can locate them easily enough but I am struggling to navigate ... right element node or catch the code node before I begin to loop ... In your example @results looks like it would contain references to ...
    (perl.beginners)

Quantcast