Windows 7 - countif and sumif

Asked By pbusci on 10-Aug-12 11:32 AM
I am trying to count the cells in a sheet that have a certain year and a certain month. I am not sure how to write the criteria. Any help would be appreciated.

Thanks




Claus Busch replied to pbusci on 10-Aug-12 11:37 AM
Hi,

Am Fri, 10 Aug 2012 08:32:25 -0700 (PDT) schrieb pbuscio@comcast.net:


your values in A1:A100, year = 2010, month = may:
=SUMPRODUCT(--(YEAR(A1:A100)=2010),--(MONTH(A1:A100)=5))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
pbusci replied to Claus Busch on 10-Aug-12 11:56 AM
nt the cells in a sheet that have a certain year and a certain month. I am =
not sure how to write the criteria. Any help would be appreciated. your val=
ues in A1:A100, year =3D 2010, month =3D may: =3DSUMPRODUCT(--(YEAR(A1:A100=
)=3D2010),--(MONTH(A1:A100)=3D5)) Regards Claus Busch -- Win XP PRof SP2 / =
Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2

Thanks. That works for counting. How about if I need to add the value from =
another range based on the counted cells. Like sumif?
Claus Busch replied to pbusci on 10-Aug-12 12:02 PM
Hi,

Am Fri, 10 Aug 2012 08:56:12 -0700 (PDT) schrieb pbuscio@comcast.net:


the values to sum in B1:B100:
=SUMPRODUCT(--(YEAR(A1:A100)=2010),--(MONTH(A1:A100)=5),B1:B100)


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2