=countif formula for dates and values

MTMann122

New Member
Joined
Mar 17, 2008
Messages
20
I have a range of cells where the value is either a 1 or a 0. This makes the formula easy to calculate =SUM(A1:A55). Now I want to total up the range of cells but I want to use a date in some cells. I want the formula to return the number of cells with either a "1" or a "DATE 5/31-2011". Of course the date value would be various.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
If I understand correctly you wish to count dates and 1's....or said another way anything greater than zero. If so then this should work:

=COUNTIF(A1:A55,">0")

....to count only the 1's try:
=COUNTIF(A1:A55,"=1")

To count only the dates try:
=COUNTIF(A1:A55,">1")
 
Upvote 0
I have a range of cells where the value is either a 1 or a 0. This makes the formula easy to calculate =SUM(A1:A55). Now I want to total up the range of cells but I want to use a date in some cells. I want the formula to return the number of cells with either a "1" or a "DATE 5/31-2011". Of course the date value would be various.

=COUNTIF(A1:A55,1)+COUNTIF(A1:A55,DATE(2011,5,31))

Is this what you want to do?
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
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