View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier[_3_] Roger Govier[_3_] is offline
external usenet poster
 
Posts: 2,480
Default Formula for counting events

Hi Michael

Assuming the dates are in column A
=SUMPRODUCT(--(MONTH($A$1:$A$200=1))
will give the total for January

If you entered Jan through Dec in say E1:E12, you could put in F1
=SUMPRODUCT(--(MONTH($A$1:$A$200=ROW(F1)))
and copy down.

As you copy down, Row() will increase from 1 through 12 and give the results
for each Month.

If you had data straddling a year, say you wanted from Apr 2004 to Mar 2005,
then enter in E1:E12 proper dates for the month e.g. 01 Apr 2004, etc. but
format the cells as FormatCellsNumberCustom mmm
Then use the formula in F1
=SUMPRODUCT(--(TEXT($A$1:$A$200,"yymm"=TEXT(E1,"yymm"))
and copy down
--
Regards
Roger Govier

"Michael" wrote in message
...
Is there a simple formula for counting events per date?
E.g. I have a list of dates of birth of 200 kids born in 2005 and I would
like to create a table with the numbers of kids born in Jan 2005, Feb
2005,
March 2005 etc.
Please help me with a formula.