Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 504
Default sumif for months and year

a b c d e
-----------------------------------------------------------------------------
1| 13-Nov-06 20-Nov-06 27-Nov-06 4-Dec-06 11-Dec-06
2| 1 2 3 4 5
3|
4| November, 06
5| 0

I need cell a5 to sum a2:e2 if the month and year on a1:e1 match a4.
I tried =SUMIF(a1:e1,"*Nov*",a2:e2)
and =SUMPRODUCT(--(a1:e1=DATE(YEAR(a4),MONTH(a4),b2:e2)))

Any suggestions?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default sumif for months and year

=SUMPRODUCT(--(YEAR(A1:E1)=YEAR(A4)),--(MONTH(A1:E1)=MONTH(A4)),A2:E2)


note that you shouldn't have text in A4, it needs to be a date although you
can custom format is as

mmmm, yy



--


Regards,


Peo Sjoblom


"Kevin" wrote in message
...
a b c d
e
-----------------------------------------------------------------------------
1| 13-Nov-06 20-Nov-06 27-Nov-06 4-Dec-06 11-Dec-06
2| 1 2 3 4 5
3|
4| November, 06
5| 0

I need cell a5 to sum a2:e2 if the month and year on a1:e1 match a4.
I tried =SUMIF(a1:e1,"*Nov*",a2:e2)
and =SUMPRODUCT(--(a1:e1=DATE(YEAR(a4),MONTH(a4),b2:e2)))

Any suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 504
Default sumif for months and year

Wheeewww, that works!! Thanks so much

"Peo Sjoblom" wrote:

=SUMPRODUCT(--(YEAR(A1:E1)=YEAR(A4)),--(MONTH(A1:E1)=MONTH(A4)),A2:E2)


note that you shouldn't have text in A4, it needs to be a date although you
can custom format is as

mmmm, yy



--


Regards,


Peo Sjoblom


"Kevin" wrote in message
...
a b c d
e
-----------------------------------------------------------------------------
1| 13-Nov-06 20-Nov-06 27-Nov-06 4-Dec-06 11-Dec-06
2| 1 2 3 4 5
3|
4| November, 06
5| 0

I need cell a5 to sum a2:e2 if the month and year on a1:e1 match a4.
I tried =SUMIF(a1:e1,"*Nov*",a2:e2)
and =SUMPRODUCT(--(a1:e1=DATE(YEAR(a4),MONTH(a4),b2:e2)))

Any suggestions?




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
Year-Days-Months Steve Excel Worksheet Functions 10 September 3rd 06 07:05 AM
Within 6 months, Within 1 year and so on... MER Excel Discussion (Misc queries) 1 August 2nd 06 08:05 PM
Locate particular months sale with year Rao Ratan Singh New Users to Excel 2 March 3rd 06 06:07 AM
Calculating by individual months of the year Maddoktor Excel Discussion (Misc queries) 3 February 8th 06 08:55 PM
How do i change 15 months to read 1 year and 3 months? Marty Excel Discussion (Misc queries) 1 February 17th 05 11:21 PM


All times are GMT +1. The time now is 07:37 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"