View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Countif Sumproduct

One way:

=SUMPRODUCT(--(MONTH(CALLS!A8:A500)=1),--(CALLS!G8:G500="DP"))

Where 1 is the month number for January. Note that that applies to month 1
of *any* year. Also, that will evaluate empty cells as month 1.

Another option is to use cells to hold your date boundaries:

A1 = start date = 1/1/2008
B1 = end date = 1/31/2008

=SUMPRODUCT(--(CALLS!A8:A500=A1),--(CALLS!A8:A500<=B1),--(CALLS!G8:G500="DP"))


--
Biff
Microsoft Excel MVP


"gjameson via OfficeKB.com" <u21717@uwe wrote in message
news:8ee86e2332540@uwe...
I just want to count the occurrences for any given month in the year. How
would you set
up the date range?

I have tried
=SUMPRODUCT(--(CALLS!A8:A500=DATE(2008,1)),--(CALLS!G8:G500="DP")

)
but I get the error too few arguments.

Gerald

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200812/1