Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Sum items occurring in a month and year

I've got the following formula to sum referrals received in a particular month.

Is it possible to make it specific to the year as well as the month?

=SUM(IF(Referrals!$D$4:$D$10002='Referrals
List'!$A5,IF(Referrals!$J$4:$J$10002=MONTH($B$2),1 ,0)))
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Sum items occurring in a month and year

Take a look at SumProduct instead...

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
HTH...

Jim Thomlinson


"Saylindara" wrote:

I've got the following formula to sum referrals received in a particular month.

Is it possible to make it specific to the year as well as the month?

=SUM(IF(Referrals!$D$4:$D$10002='Referrals
List'!$A5,IF(Referrals!$J$4:$J$10002=MONTH($B$2),1 ,0)))

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 269
Default Sum items occurring in a month and year

In Excel 2007 the SUMIFS function will allow multiple criteria.

You can also use a conditional SUMPRODUCT like this
=sumproduct(--(D4:D10002=Referrals List!$A$5),--(j4:J10002=Month($b$2)),"ADD
YEAR HERE,ADD DATA RANGE TO SUM).

This would effectively add all column R totals whenever the referral in D
mathces the target and the Date in J matches the Month and Year target)

=sumproduct (--(d4:D10002=Referrals
List!$a$5),--(month(J4:J10002)=Month($b$2),--(Year(j4:j10002)=Year($b$2),
R4:R10002)
--
If this helps, please remember to click yes.

=SUM(IF(Referrals!$D$4:$D$10002='Referrals
List'!$A5,IF(Referrals!$J$4:$J$10002=MONTH($B$2),1 ,0)))


"Saylindara" wrote:

I've got the following formula to sum referrals received in a particular month.

Is it possible to make it specific to the year as well as the month?

=SUM(IF(Referrals!$D$4:$D$10002='Referrals
List'!$A5,IF(Referrals!$J$4:$J$10002=MONTH($B$2),1 ,0)))

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Sum items occurring in a month and year

=SUM(IF(Referrals!$D$4:$D$10002='Referrals List'!$A5,
IF(TEXT(Referrals!$J$4:$J$10002,"yyyymm")=TEXT($B$ 2,"yyyymm"),1,0)))

(still an array formula)


Or a non-array entered formula:
=SUMPRODUCT(--(Referrals!$D$4:$D$10002='Referrals List'!$A5),
--(TEXT(Referrals!$J$4:$J$10002,"yyyymm")=TEXT($B$2, "yyyymm")))

Adjust the ranges to match--but you can't use whole columns (except in xl2007+).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

Saylindara wrote:

I've got the following formula to sum referrals received in a particular month.

Is it possible to make it specific to the year as well as the month?

=SUM(IF(Referrals!$D$4:$D$10002='Referrals
List'!$A5,IF(Referrals!$J$4:$J$10002=MONTH($B$2),1 ,0)))


--

Dave Peterson
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
count month when date is in day/month/year format ccKennedy Excel Worksheet Functions 6 April 30th 09 03:32 AM
Tell me which "season" (Month/Day through Month/Day) a date(Month/Day/Year) falls in (any year)??? misscrf Excel Discussion (Misc queries) 1 December 14th 07 02:59 PM
Excel 2002 : How to sum up items by month, date and year ? Mr. Low Excel Discussion (Misc queries) 4 November 21st 06 11:51 AM
trying to get day/month/year froamt while user enters year only RADIOOZ New Users to Excel 3 June 7th 06 05:30 AM
How do I add items within the last year Kevbro7189 Excel Discussion (Misc queries) 1 January 5th 06 12:57 AM


All times are GMT +1. The time now is 04:17 PM.

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"