I Need to Count a Date

BYates123

New Member
Joined
Jun 17, 2011
Messages
24
This shouldn't be too difficult but I can't figure it out:

I have a list of dates that read examples such as "1/3/1900" and "4/16/2004". I want to count all of the cells that contain "1900". I tried =COUNTIF(A1:A10,"*1900"), which I thought would work, but it returned a value of 0. What should I do?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
This shouldn't be too difficult but I can't figure it out:

I have a list of dates that read examples such as "1/3/1900" and "4/16/2004". I want to count all of the cells that contain "1900". I tried =COUNTIF(A1:A10,"*1900"), which I thought would work, but it returned a value of 0. What should I do?
One way...

=SUMPRODUCT(--(YEAR(A1:A10)=1900))

Assumes there are no empty cells and no text entries in the range.
 
Upvote 0
Thanks a lot that seemed to work. I also need to count the dates before today in a certain range...would I use SUMPRODUCT for that as well?
 
Upvote 0
Thanks a lot that seemed to work. I also need to count the dates before today in a certain range...would I use SUMPRODUCT for that as well?
Before today means less than today.

Try this:

=COUNTIF(A1:A10,"<"&TODAY())
 
Upvote 0

Forum statistics

Threads
1,224,519
Messages
6,179,263
Members
452,902
Latest member
Knuddeluff

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