Excel Formula

jleasure457

New Member
Joined
Dec 27, 2018
Messages
9
Office Version
  1. 365
Platform
  1. Windows
I'm trying to create a spreadsheet that takes multiple, "Yes", "No", and "N/A" responses and translates them into overall percentage. There are 4 columns, all of which will have a Yes, No, or N/A option as a drop down. I want the spreadsheet to be able to read the these 4 fields and give a percentage. For example is all 4 columns are "Yes", it would be 100%. If 3 are "Yes" and 1 is "No", it would be 75%. If any of the columns are N/A, it doesn't take that column into consideration when calculating the percentage. So, if Column 1 and 2 are "Yes", Column 3 is "No", and Column 4 is "N/A". It would be 66.66%.

Thanks in advance for your help.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi,

Format result cells as "percentage":


Book1
ABCDE
1YesYesYesYes100.00%
2YesNoYesYes75.00%
3YesYesN/ANo66.67%
Sheet427
Cell Formulas
RangeFormula
E1=COUNTIF(A1:D1,"Yes")/(4-COUNTIF(A1:D1,"N/A"))
 
Upvote 0
try

Code:
=(COUNTIF(A1:D1,"no")+COUNTIF(A1:D1,"yes"))/COUNTA(A1:D1)
 
Upvote 0
Hi,

Format result cells as "percentage":

ABCDE
YesYesYesYes
YesNoYesYes
YesYesN/ANo

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]100.00%[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]75.00%[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]66.67%[/TD]

</tbody>
Sheet427

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E1[/TH]
[TD="align: left"]=COUNTIF(A1:D1,"Yes")/(4-COUNTIF(A1:D1,"N/A"))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Thank you. This works perfectly!
 
Upvote 0
You're welcome, welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top