ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Statement calculating Average if you have numeric & text respon (https://www.excelbanter.com/excel-worksheet-functions/223012-if-statement-calculating-average-if-you-have-numeric-text-respon.html)

mellermj

IF Statement calculating Average if you have numeric & text respon
 
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?

Bernard Liengme[_3_]

IF Statement calculating Average if you have numeric & text respon
 
=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

"mellermj" wrote in message
...
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?




mellermj

IF Statement calculating Average if you have numeric & text re
 
Thank you. That works perfectly.

"Bernard Liengme" wrote:

=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

"mellermj" wrote in message
...
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?






All times are GMT +1. The time now is 08:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com