counting dates

S

scsag

I'm trying to set a formula to count dates in a column by months. Such as,
the total number of dates in October, the total in November, etc. Any help?
 
F

Frank Kabel

Hi
try
=SUMPRODUCT(--(MONTH(A1:A100)=10),--(A1:A100<>""))

--
Regards
Frank Kabel
Frankfurt, Germany

scsag said:
I'm trying to set a formula to count dates in a column by months. Such as,
the total number of dates in October, the total in November, etc.
Any help?
 
S

Sandy Mann

Frank,

May I ask why you added the

--(A1:A100<>"")

=SUMPRODUCT(--(MONTH(A1:A100)=10))

seems to work for me and it ignores blanks. Both formulas return #VALUE! if
any cell contains text.

Just curious

Sandy
 
F

Frank Kabel

Hi
if you search for October no need for it but if you would search for
January (1) the formula would count empty cells as well (as a blank
cell is the same as the date '00-Jan-1900')

Try this with the formula
=MONTH(A1)
then A1 is empty. It will return '1'
 

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