Why is this "COUNTIF" formula returning 0?

Peter h

Active Member
Joined
Dec 8, 2015
Messages
417
Can someone please tell me what I'm doing wrong here?

=COUNTIF(Revert!F:F,Revert!C:C>EOMONTH(A10,-1))

I want to count all rows on my "Revert" sheet that are after the date in A10. So if I have the date 9/1/18 in A10, it should count all rows that have a date of 9/1 to the present day.

Edit:I did this test to make sure it would work, and it did come back true, so it should count it.
=IF(Revert!C2>EOMONTH(A10,-1),"It is greater","It is not greater")

Thanks.
 
Last edited:

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You are welcome. We are missing the & bit
that formula needs:


=COUNTIF(Revert!C:C,">"&EOMONTH(A10,-1))

Ya, I noticed that, and adjusted it. Just had forgotten to mention it.

How would I adjust the formula to do a count of all cells in a range, depending on whether or not the cell in "C" fit the criteria? I was thinking something like,

=COUNTIF(Other!E:K,Other!C:C&">"&EOMONTH(A10,-1))

I thought that would work, but it returns 0.

Formulas are way more tricky to me than vba code... lol.
 
Upvote 0
What do you have in E:K, text?

No. There are numeric values. Some cells have data, and others are blank in that range, so I'm trying to count how many cells have data. If I do a test formula ( =COUNT(E:K) ) it returns 1,964. So, the count function works, I just wanted to be able to manipulate the countif so that it only counts the rows that meet my criteria.
 
Upvote 0
No. There are numeric values. Some cells have data, and others are blank in that range, so I'm trying to count how many cells have data. If I do a test formula ( =COUNT(E:K) ) it returns 1,964. So, the count function works, I just wanted to be able to manipulate the countif so that it only counts the rows that meet my criteria.

Control+shift+enter, not just enter:

=SUM(IF(Other!C$2:C$2000>EOMONTH(A10,-1),IF(ISNUMBER(Other!E$2:K$2000),1)))
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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