ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula for counting and dividing (https://www.excelbanter.com/excel-worksheet-functions/230736-formula-counting-dividing.html)

Preschool Mike

Formula for counting and dividing
 
Here's my example. Cells A1:H1 have + (plus sign: goal met) and - (minus
sign: goal not met) in them and some cells in the same row have nothing if
the goal was not ran that day. I need a formula that counts the number of +
signs and - signs (a total of the two: adding + and - together) and then it
divides the number of + signs by the answer. Any help is appreciated. I'd
like to have the answer in the format of percentage or fraction. I'm using
excel 2007 and the cell containing the answer are merged (will they need to
be unmerged?).

Thanks,
Mike

Sean Timmons

Formula for counting and dividing
 
They would need to be unmerged first...

=Countif(A1:H1,"+")/counta(A1:H1)

This assumes those that have nothing truly are blank.

Otherwise:

=Countif(A1:H1,"+")/(Countif(A1:H1,"+")+Countif(A1:H1,"-"))

Gets it for sure.

"Preschool Mike" wrote:

Here's my example. Cells A1:H1 have + (plus sign: goal met) and - (minus
sign: goal not met) in them and some cells in the same row have nothing if
the goal was not ran that day. I need a formula that counts the number of +
signs and - signs (a total of the two: adding + and - together) and then it
divides the number of + signs by the answer. Any help is appreciated. I'd
like to have the answer in the format of percentage or fraction. I'm using
excel 2007 and the cell containing the answer are merged (will they need to
be unmerged?).

Thanks,
Mike



All times are GMT +1. The time now is 05:32 AM.

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