Counting cells with particular month and year

  • Thread starter Thread starter Saylindara
  • Start date Start date
S

Saylindara

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)))
 
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!
 
Try

With month in A1 and year in A
=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)))
 
Back
Top