In a set of dates, can you count the number of Jan '07 instances?

G

Guest

I have a column of dates where I need to count the number of instances that
fall within Jan 1 to Jan 31 2007. I have tried to use the countif function
and can only count values greater than a value or less than a value, but not
between two values. Is there another way?
 
R

Rick Rothstein \(MVP - VB\)

I have a column of dates where I need to count the number of instances that
fall within Jan 1 to Jan 31 2007. I have tried to use the countif
function
and can only count values greater than a value or less than a value, but
not
between two values. Is there another way?

This should work...

=SUMPRODUCT((C2:C100>=DATE(2007,1,1))*(C2:C100<=DATE(2007,1,31)))

Use your column instead of column C like I did and change the starting point
to rows to the start of your data, set the ending rows to a number that will
be equal to or larger than largest row you will ever occupy.

Rick
 
G

Guest

tr
=SUMPRODUCT(--(daterange>DATEVALUE("12/31/2006")),--(daterange<DATEVALUE("2/1/2007")))
 
G

Guest

Thank you Rick, this did the trick. I have never used this function and had
to do some research to figure out the logic, but I will use this function
lots now that I am aware of it.
 

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