Countif is not working when trying to count results from if/and Statement

rengifot

New Member
Joined
Jan 5, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I am trying to count all the "Yes" on column AY (<4 Fills) but formula COUNTIF only returns zeros, field AY52. By the way, the "Yes" are the result of using the if/and statement so I am sure if that that is the reason the COUNTIF formula is not working.
 

Attachments

  • Annotation 2021-08-06 141544.jpg
    Annotation 2021-08-06 141544.jpg
    223 KB · Views: 6

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I can't quite tell from that picture, but I think your AY8 formula should be:

Excel Formula:
=IF(AND(AX8="YES",V8>3),"","YES")

with a small change in the AND. And I'm not sure why your COUNTIF isn't working, but is there a space after the "YES" in the AY8 formula? If so try this:

Excel Formula:
=COUNTIF(AY3:AY51,"YES*")
 
Upvote 0
New PatientsQ1Q2
201804201805201806201807201808201809201810201811201812201901201902201903New Patient?<4 Fills
NewYes
NewYes
NewYesYesIF((AND(AX8,"Yes",V8>3))," ","Yes ")
NewYesYes
NewYes
NewYes
Yes
Yes
NewYes
NewYesYes
Yes
NewYes
NewYes
NewYes
Yes
NewYesYes
NewYesYes
Yes
Yes
NewYesYes
NewYesYes
NewYesYes
Yes
Yes
Yes
Yes
Yes
Yes
NewYesYes
Yes
NewYesYes
Yes
Yes
Yes
NewYesYes
Yes
Yes
Yes
Yes
NewYesYes
Yes
1​
1​
2​
3​
4​
1​
2​
0​
1​
1​
2​
2​
20​
COUNTIF(AY3:AY51,"Yes")

I can't quite tell from that picture, but I think your AY8 formula should be:

Excel Formula:
=IF(AND(AX8="YES",V8>3),"","YES")

with a small change in the AND. And I'm not sure why your COUNTIF isn't working, but is there a space after the "YES" in the AY8 formula? If so try this:

Excel Formula:
=COUNTIF(AY3:AY51,"YES*")
Thanks Eric W. It worked!!
 
Upvote 0

Forum statistics

Threads
1,215,358
Messages
6,124,487
Members
449,165
Latest member
ChipDude83

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