Averaging Text vs. Numbers

N

NKDodd

I have a column that we either enter “y†for yes or “n†for no to track
passing scores. Is there a way that I can average the yes’ and no’s from the
same column?
 
A

aidan.heritage

a combination of the countif and counta functions would do it for you

=COUNTIF(A1:A4,"yes")/COUNTA(A1:A4)
 
B

Bob Phillips

=COUNTIF(G:G,"y")/COUNTA(G:G)

and format as a percentage

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
N

NKDodd

Thank you very much. I knew I must have been trying to make this harder than
needed...
 
R

Richard Buttrey

I have a column that we either enter “y” for yes or “n” for no to track
passing scores. Is there a way that I can average the yes’ and no’s from the
same column?


One way.

With scores in A1:A20 and y/n in B1:B10

Average of the y cells
=SUMIF(B1:B20,"y",A1:A20)/SUMPRODUCT((A1:A20<>"")*(B1:B20="y"))

Average of the n cells
just change the y's to n's


HTH
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
 
N

NKDodd

Thanks for your help... it worked great

Bob Phillips said:
=COUNTIF(G:G,"y")/COUNTA(G:G)

and format as a percentage

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

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