IF Statement calculating Average if you have numeric & text respon

M

mellermj

I have a worksheet that tracks responses by month for each quarter. What is
the best way to set up an equation that will calculate the average if the
responses can either be a percentage or Yes or No response?
 
B

Bernard Liengme

=AVERAGE(A1:A10) will ignore text
Are you asking how to include it? Do you want Yes=1 and No =0 in the
average?
If so:
=(SUM(G1:G6)+SUMPRODUCT(--(G1:G6="yes")))/COUNTA(G1:G6)
best wishes
 
M

mellermj

Thank you. That works perfectly.

Bernard Liengme said:
=AVERAGE(A1:A10) will ignore text
Are you asking how to include it? Do you want Yes=1 and No =0 in the
average?
If so:
=(SUM(G1:G6)+SUMPRODUCT(--(G1:G6="yes")))/COUNTA(G1:G6)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
 

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