Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default SUMIF() confusion (Excel 2003)

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default SUMIF() confusion (Excel 2003)

Ann Scharpf wrote:
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.




Try this:

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

Also, I suggest NOT using a defined name that is the same as a function name.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default SUMIF() confusion (Excel 2003)

Thanks to both of you for posting about the SUMPRODUCT(). I thought I only
needed to use that function if I was looking at two or more conditions.

I've also never used the DATE() function. Didn't realize it was a function.
I'll rename my range.


--
Ann Scharpf


"Glenn" wrote:

Ann Scharpf wrote:
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.




Try this:

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

Also, I suggest NOT using a defined name that is the same as a function name.
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using SumIf Across Multiple Worksheets - Excel 2003 Charlie''s CA Excel Worksheet Functions 0 October 8th 09 06:51 PM
SUMIF(S) not available on Excel 2003 Longhag Excel Discussion (Misc queries) 18 September 10th 08 01:03 PM
sumif formula in Excel 2003 Ellen New Users to Excel 4 February 12th 08 02:43 PM
Sumif for groups and subgroups / Excel 2003 mwear Excel Worksheet Functions 9 January 18th 08 08:28 PM
Validation Confusion-Excel 2003 Shirley Zaknich Excel Discussion (Misc queries) 2 August 17th 05 01:51 AM


All times are GMT +1. The time now is 11:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"