MONTH() function for range?

M

MDW

I've got what aught to be a simple problem. I've got a
column of dates, and I'd like to see how many of these
dates are from a particular month. I know that I can use
MONTH(A1) to a return a value for a single cell. I also
know that I can use the COUNTIF([range],[criterion]) to
check if a range meets a certain criterion.

However, I seem unable to combine the two. I imagine that
my result for, say, Janurary wants to be somthing like
=COUNTIF([range],MONTH([magic something goes here])=1)

I just can't figure out what that magic something is!

Any thoughts?
 
D

Dave R.

Sumproduct can be used to do what countif does--

try

=+SUMPRODUCT((MONTH(E9:E12)=4)*1)

this looks at the dates, and if the month is 4, tallies those.
 
J

Jason Morin

Forget COUNTIF in this sitation. Use something like:

=SUMPRODUCT(0+(MONTH(A1:A100)=1))

where 1=Jan,2=Feb,3=Mar, and so on.

HTH
Jason
Atlanta, GA
 

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