Countif/counta?

The Grim Discovery

Board Regular
Joined
Jan 23, 2015
Messages
241
Office Version
  1. 365
Platform
  1. Windows
Hello people

In my lovely worksheet cells A1:A10 can either be blank, contain a date or contain a "no".
I'm trying to work out a formula that will allow me to calculate the % of non-blank cells that do not contain a "no". I've tried dividing countifs of no by countifs of<>no and dividing countifs by counta but I cant get it. Could someone help? THanks in advance.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Dividing Countif(range,"no") by COUNTA(range) should work - assuming that the blank cells are actually empty.
 
Upvote 0
Cheers Rory. But I'm still having issues with this - and the cells are blank as far as I can tell. (I've cleared contents, deleted, etc)

=COUNTIF(Range,"No")/COUNTA(Range)%

works fine in terms of counting "no" across the specified range. Four of the cells are non-blank and of these three contain "no" giving a total of 75%.
But I need to know the responses that aren't "no" which here should be 25%. So I modify the formula to:

=COUNTIF(E12:N12,"<>No")/COUNTA(E12:N12)%
But this is giving me a total of 175% not the 25% i'm expecting. Any clue?
As ever thanks in advance.
 
Upvote 0
Does this work for you?

=COUNT(range)/(COUNT(range)+COUNTIF(range,"?*"))

If not, you can perhaps post a sample along with the result that you expect from that sample.
 
Upvote 0
=COUNTIF(E12:N12,"<>No")/COUNTA(E12:N12)%
But this is giving me a total of 175% not the 25% i'm expecting. Any clue?

The blue part will also count blank cells.

Given that you already have the 75% calculated, why not just subtract that from 1 for your second result?
 
Upvote 0

Forum statistics

Threads
1,215,256
Messages
6,123,912
Members
449,132
Latest member
Rosie14

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