Can you help me write this formula?

B

blazon

I'm trying to create a formula that involves counting and percents. So,
in the range A9:AE9, I want to count the number of times "y" appears
(each cell of the range has a "y", "n", or "n/a") and divide that
number by 31 (the number of columns in the range). It sounds simple,
but I can't figure it out!

Any help is appreciated.

Thanks!
 
S

swatsp0p

Remember, you are dividing by the number of columns. Is there only one
entry per column, therefore, an N/A makes that column not part of the
group?
 
S

swatsp0p

Then subtract the number of "n/a" from the count of columns (31), a
such:

=COUNTIF(A9:AE9,"=y")/(31-COUNTIF(A9:AE9,"=n/a"))

Should work
 
S

Sloth

=COUNTIF(A9:AE9,"=y")/(COUNTA(A9:AE9)-COUNTIF(A9:AE9,"=n/a"))

or

=COUNTIF(A9:AE9,"=y")/(31-COUNTIF(A9:AE9,"=n/a"))

(If the number of columns is always 31)

These formulas should work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top