Count number of cells that fall within a range of dates

M

mmay321

I am creating a log that keeps track of how many of a certain produc
are sold within the month. The product is always sold one at a time, s
i just need a formula that can will look at the date column and repor
how many entries fall within the given month. The date is entered i
the following format: mm/dd/yy. I have tried using the COUNTI
function:

=COUNTIF(log!A2:log!A3000, CRITERIA)

However, I do not know how to set up the CRITERIA to calculate al
dates within a month, since the dates are not entered just as month an
year, but include the day

+-------------------------------------------------------------------
|Filename: Z-Gun SN Log.zip
|Download: http://www.excelforum.com/attachment.php?postid=3677
+-------------------------------------------------------------------
 
K

KL

Hi,

Try something like this:

=SUMPRODUCT(--(TEXT(log!A2:A3000,"MMYY"="0805"))
or
=SUMPRODUCT(--(MONTH(log!A2:A3000)=8),--(YEAR(log!A2:A3000)=2005))
or
=SUMPRODUCT(--(log!A2:A3000>=--"2005-08-01"),--(log!A2:A3000<=--"2005-08-31"))


Regards,
KL
 
C

CLR

Try counting all the cells "greater than" your minimum date and subtracting
a count of all the cells "greater than" your maximum date..........the
result will be a count of those cells within the two dates.........

Vaya con Dios,
Chuck, CABGx3
 
M

mmay321

this worked great:
=SUMPRODUCT(--(MONTH(log!A2:A3000)=8),--(YEAR(log!A2:A3000)=2005))

thanks,
michelle
 

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