COUNTIF Question

Z

zbert

The following countif function works well for me but I was wondering ho
I could use a date range criteria from a different column. I want t
count all ocurrences of "Metro" in the month of Otcober.

=COUNTIF('PRT Metrics'!M8:M78,"Metro")

This formula counts all occurences of the word "Metro" in the rang
M8:M78.

I'd like to count all occurence within a given month
 
A

Aladin Akyurek

That requires a formula for multiconditional counting with a differen
function...

Assuming that 'PRT Metrics'!$N$8:$N$78 is the date range:

=SUMPRODUCT(--('PRT Metrics'!$M$8:$M$78=E2),--(MONTH('PR
Metrics'!$N$8:$N$78)=MONTH(F2)),--(YEAR('PR
Metrics'!$N$8:$N$78)=YEAR(F2)))

where E2 houses a condition like Metro and F2 a date condition lik
10/1/04 (a true date), possibly formatted as mmm-yy to read Oct-04.

Adjust to suit.
 
R

Ragdyer

Try this, with the date in Column N:

=SUMPRODUCT((M8:M78="Metro")*(MONTH(N8:N78)=10))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top