Help with COUNTIF statement

ronni_e

New Member
Joined
Jan 13, 2005
Messages
17
I have data that contains data with dates. Dates are in the format of 12/1/2004 etc. I want to make a countif statement to tell me many values fall in a particular month.. So here is what I am trying

=COUNTIF(data!K5:K1480,12/1/2004:12/31/2004)

Which doesnt work.. It will tell me what is on 12/1/2004 if I remove the :12/31/2004..

What is the method to specify a range in the criteria?

data!K5:K1480 is the page and column that I want to find the values of.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Welcome to the board!

Try =COUNTIF(data!K5:K1480, "<1/1/2005")-COUNTIF(data!K5:K1480,"<12/1/2004")
 
Upvote 0
I will give that a try.. Didnt think of doing it that way.. Basically I need to know how many values fall in each month.. so for say January of 2004 id do something like >12/31/2004 and <2/1/2004

Thanks.. I dont see why that wont work
 
Upvote 0
ronni_e said:
I will give that a try.. Didnt think of doing it that way.. Basically I need to know how many values fall in each month.. so for say January of 2004 id do something like >12/31/2004 and <2/1/2004

Thanks.. I dont see why that wont work

You could use,

=SUMPRODUCT(--(YEAR(DateRange)=2004),--(MONTH(DateRange)=1))
 
Upvote 0

Forum statistics

Threads
1,223,286
Messages
6,171,185
Members
452,390
Latest member
kemafa77

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top