Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Counting cells with particular month and year

Thanks to help previously received, I have been using this formula to count
the number of referrals received in a particular month. Is it possible to
include the year as well?

=SUMPRODUCT(--(MONTH(A2:A10)=Stats!A1),--(ISNUMBER(B2:B10)))


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 506
Default Counting cells with particular month and year

Now the Year also included in the below formula the year reference cell is
referred in B1 cell of STATS sheet.

=SUMPRODUCT(--(MONTH(A2:A10)=Stats!A1)*--(YEAR(A2:A10)=Stats!B1),--(ISNUMBER(B2:B10)))

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Saylindara" wrote:

Thanks to help previously received, I have been using this formula to count
the number of referrals received in a particular month. Is it possible to
include the year as well?

=SUMPRODUCT(--(MONTH(A2:A10)=Stats!A1),--(ISNUMBER(B2:B10)))


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Counting cells with particular month and year

Try

With month in A1 and year in A2
=SUMPRODUCT(--(MONTH(A2:A10)=sTATS!A1)*(YEAR(A2:A10)=sTATS!A2),--(ISNUMBER(B2:B10)))

OR with a valid date in Stats!A1

=SUMPRODUCT((TEXT(A2:A10,"mmyyyy")=TEXT(sTATS!A1," mmyyyy"))*(ISNUMBER(B2:B10)))

--
Jacob


"Saylindara" wrote:

Thanks to help previously received, I have been using this formula to count
the number of referrals received in a particular month. Is it possible to
include the year as well?

=SUMPRODUCT(--(MONTH(A2:A10)=Stats!A1),--(ISNUMBER(B2:B10)))


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Counting cells with particular month and year

You don't need the double unary minus with the multiplication.
There is nothing magical about the use of double unary minus; to convert a
boolean to a number you need to do an arithmetic operation on it. Two
negations is an easy option, but multiplying by 1 or adding zero are other
equally acceptable options. In your case you are multiplying two booleans,
so they are automatically converted to numbers, and your double unary minus
on each of the multiplicands add no additional functionality.

You can change
=SUMPRODUCT(--(MONTH(A2:A10)=Stats!A1)*--(YEAR(A2:A10)=Stats!B1),--(ISNUMBER(B2:B10)))
to
=SUMPRODUCT((MONTH(A2:A10)=Stats!A1)*(YEAR(A2:A10) =Stats!B1),--(ISNUMBER(B2:B10)))
or
=SUMPRODUCT(--(MONTH(A2:A10)=Stats!A1),--(YEAR(A2:A10)=Stats!B1),--(ISNUMBER(B2:B10)))
or
=SUMPRODUCT((MONTH(A2:A10)=Stats!A1)*(YEAR(A2:A10) =Stats!B1)*(ISNUMBER(B2:B10)))
--
David Biddulph

"Ms-Exl-Learner" wrote in message
...
Now the Year also included in the below formula the year reference cell is
referred in B1 cell of STATS sheet.

=SUMPRODUCT(--(MONTH(A2:A10)=Stats!A1)*--(YEAR(A2:A10)=Stats!B1),--(ISNUMBER(B2:B10)))

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Saylindara" wrote:

Thanks to help previously received, I have been using this formula to
count
the number of referrals received in a particular month. Is it possible to
include the year as well?

=SUMPRODUCT(--(MONTH(A2:A10)=Stats!A1),--(ISNUMBER(B2:B10)))




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
Counting data for month and year ahkasiv Excel Discussion (Misc queries) 3 August 6th 08 01:00 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
Counting distinct entries based on meeting month & year criteria jennifer Excel Worksheet Functions 3 February 9th 06 01:56 PM
Counting Entries by Month and Year ImaGina Excel Worksheet Functions 1 January 5th 06 06:11 AM
counting date entries by month & year Di Excel Worksheet Functions 7 August 24th 05 08:39 PM


All times are GMT +1. The time now is 10:00 PM.

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

About Us

"It's about Microsoft Excel"