View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_4_] Bob Phillips[_4_] is offline
external usenet poster
 
Posts: 834
Default SUMIF() confusion (Excel 2003)

Try

=SUMPRODUCT(--(YEAR(Date)=YEAR(TODAY())),LWOP)

HTH

Bob

"Ann Scharpf" wrote in message
...
I have a table with named ranges:

A = Date
F = LWOP

I am trying to calculate the LWOP taken in the CURRENT calendar year. My
formula is yielding a result of 0, even though there are 8 hours of LWOP
with
a date of 2010.

These are the formulas I have tried:

=SUMIF(Date,"YEAR(Date)=YEAR(TODAY())",LWOP)
=SUMIF(Date,IF("Year(Date)=2010",TRUE),LWOP)

(I also tried both of those without the quotation marks.)

Looking at the posts here, I saw one that seemed similar from last
September
and I tried this:

=SUMIF(Date,YEAR(Date) "=" & YEAR(TODAY()),LWOP)

Excel tells me I have an error with that one and won't even let me save
the
formula.

I'm really perplexed. Can anyone advise me how to fix this? (I know I'm
going to smack myself in the head when someone tells me what I'm doing
wrong.)

As always, thanks so much for your help.


--
Ann Scharpf