Countif or Sumproduct problem
I like:
=SUMPRODUCT(--(M8:M56=date(2008,10,2)),--(E8:E56="M"))
I find it less ambiguous.
Bob Umlas wrote:
No---
=SUMPRODUCT(--(M8:M56=10/2/2008)--(E8:E56="M"))
would evaluate the date as 10 divided by 2, divided by 2008, not as a date.
You need this:
=SUMPRODUCT(--(M8:M56=DATEVALUE("10/2/2008")),--(E8:E56="M"))
Bob Umlas
Excel MVP
"Mike H" wrote in message
...
Drop the quotes
=SUMPRODUCT(--(M8:M56=10/2/2008)--(E8:E56="M"))
but i'd use
=SUMPRODUCT(--(M8:M56=a1)--(E8:E56="M"))
With my date in a1
Mike
"becknarr" wrote:
I am trying to count the number of "males" within a certain date.
When I first started, I only had one date to pick from, so my formula
was:
=COUNTIF(E8:E56,"M")
But now that I have multiple dates to choose from I tried using this
function:
=SUMPRODUCT(--(M8:M56="10/2/2008")--(E8:E56="M"))
Any suggestions?
--
Dave Peterson
|