ContIF Formula Needed

G

Guest

I need a formula that would look into a range of Dates and count how many
values I have for each month.

Example:

Date Results
1-Jan January 3
2-Jan Feb 4
3-Jan Mar 1
1-Feb Oct 2
7-Feb
9-Feb
10-Feb
5-Mar
1-Oct
2-Oct
 
M

Myrna Larson

Have you considered a pivot table, grouping the dates by month? That may be a better
solution, particularly if your data spans more than 1 year, so you have Jan 2006 and Jan
2007.

Or you can try COUNTIF. Put the month numbers in say, B1:B12, this formula in C1, and copy
it down through C12:

=COUNTIF(A$1:A$100,">="&DATE(2007,B1,1))-COUNTIF(A$1:A$100,">="&DATE(2007,B1+1,1))
 
R

RagDyer

Say your list starts in A1.
In B1 enter
jan
and copy down to B12 to create a list of unique months.

Then in C1, enter this formula:

=COUNTIF($A$1:$A$100,TEXT(B1,"mmm"))

And copy down to C12.
 
G

Guest

Hi,

Try something like this:

=SUMPRODUCT(($A$1:$A$300>0)*(MONTH($A$1:$A$300)=ROW(A1)))

this will count the number of dates for the month of january "ROW(A1)"
copy down 11 more rows for the rest of the months.

HTH
Jean-Guy
 

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