COUNTIF [criteria] + give %

Tomas4

New Member
Joined
Dec 20, 2016
Messages
2
Hi guys,

Was trying to crack this one up, got nothing but a head buzzing by now...


A2 B2 C2 D2 E2 F2 G2 H2 I2 J2 K2 L2
y y y y n y n n o o




What would be a formula to calculate % for:


Count ONLY if A2:L2 is 'y' AND 'n', ignoring anything else (blank or 'o')


Then give me a % for how many correct answers ('y') vs incorrect answers ('n')




So in this example it would be:


Total Count: 8 (5 x 'y' & 3 x 'n')
% Correct: 63%


Any suggestions?


Thank you!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You can try:

=COUNTIF($A$2:$J$2,"y")/SUM(COUNTIF($A$2:$J$2,{"y","n"}))

then format to percentage
 
Upvote 0
like this?


Excel 2012
ABCDEFGHIJKL
2yyyynynnoo
3
4y5
5n3
6y+n8
7%y62.5%
8%n37.5%
9
Sheet4
Cell Formulas
RangeFormula
B4=COUNTIF($A$2:$L$2,A4)
B5=COUNTIF($A$2:$L$2,A5)
B6=B4+B5
B7=B4/$B$6
B8=B5/$B$6
 
Upvote 0

Forum statistics

Threads
1,216,759
Messages
6,132,556
Members
449,735
Latest member
Gary_M

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