Forum Discussion

Andrew Veilleux's avatar
Andrew Veilleux
Copper Contributor
Feb 09, 2017

COUNTIF formula question

I need help with this formula I have been working on: =COUNTIFS(B7:B202,"4OB",(F7:F202,"y"),(F7:F202,"Y - Prior Admin"),(F7:F202,"Y - Pt refused"))/(COUNTIF(E7:E202,"Y")+COUNTIF(D7:D202,"N"))

 

Column B has 2 text values either 4OB or MS5. I want a formula to auto calculate percentages if column B has one or the the other text values.

 

I already use this formula to calculate percentage for all rows: =(COUNTIF(F7:F202,"y")+COUNTIF(F7:F202,"Y - Prior Admin")+COUNTIF(F7:F202,"Y - Pt refused"))/(COUNTIF(E7:E202,"Y")+COUNTIF(D7:D202,"N"))

  • Andrew, perhaps something like this

    =SUM(
       COUNTIFS(
          B7:B202,"4OB",
          F7:F202,{"y","Y - Prior Admin","Y - Pt refused"}
       )
     )/
     (COUNTIF(E7:E202,"Y")+COUNTIF(D7:D202,"N"))

Resources