Formula

Evie76

New Member
Joined
Jan 17, 2022
Messages
36
Office Version
  1. 365
Platform
  1. Windows
I have 2 formulas that do what i need them to do separately

=IF(COUNTIF(C3:C20, "Critical") = COUNTA(C3:C20), 0, IF(OR(COUNTIF(C3:C20, "N/A") > 0, COUNTIF(C3:C20, "") > 0), 0.79, 0.79 - (COUNTIF(C3:C20, "Critical") - 1) * 0.0465))

=IF(COUNTIF(C3:C20, "Critical") = COUNTA(C3:C20), 0, IF(OR(COUNTIF(C3:C20, "N/A") > 0, COUNTIF(C3:C20, "") > 0), 0.79, 1 - (COUNTIF(C3:C20, "No") / 18) * 0.2))

I've tried multiple ways of trying to put them together but it is just not working

I have a score sheet with 18 questions with answers yes, no, critical, and N/A answers.

If all answers are yes then the percentage needs to be 100%
if all the answers are no it needs to show 80%,
N/A no change in the percentage.
If all are answered as critical the percentage is 0%.
If only one question is answered as critical then the percentage drops to 79% and keeps dropping for every critical answer there is with the last one reaching 0%

can anyone help
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Here is what I have come up with:

Book1
ABC
152.67%
2
3N/A
4N/A
5No
6Yes
7Critical
8Critical
9N/A
10No
11Critical
12Yes
13Critical
14Yes
15No
16No
17Yes
18Yes
19No
20No
Sheet3
Cell Formulas
RangeFormula
C1C1=LET( Entries,$C$3:$C$20, CountYES,COUNTIF(Entries,"Yes"), CountCrit,COUNTIF(Entries,"Critical"), CountNO,COUNTIF(Entries,"No"), IF(CountCrit > 0,0.79 - (0.79/(CountCrit-1)), IF(CountN0>0,0.8+(0.2/CountYES),1)))
 
Upvote 0
Hi, i tried that but comes up with #Name?
yeah, I don't know why. But I think I am on the right track. Can you look at the logic and tell me if I am. I do have a potential DIV/0 error in there too.
 
Upvote 0
OKay @Evie76 ,
The only thing that could be wrong is if there is 1 No and All Yesses. If that is wrong then the same adjustment check needs to be done to the No Condition Check

I think this gets it:


Book1
ABCDE
1
2
3Yes81.11%
4no
5Yes
6no
7no
8no
9no
10no
11no
12no
13no
14no
15no
16no
17no
18no
19no
20no
Sheet3
Cell Formulas
RangeFormula
D3D3=LET( Entries,$C$3:$C$20, CountEntries,COUNTA($C$3:$C$20), CountYES,COUNTIF(Entries,"Yes"), CountCritical,COUNTIF(Entries,"Critical"), CountNo,COUNTIF(Entries,"No"), CritAdj, 0.79 * IF(CountCritical>1,(CountCritical-1)/(CountEntries-1),0), IF(CountCritical > 0,0.79 - CritAdj, IF(CountNo>0,0.8+(IF(CountYES>1,0.2*((CountYES-1)/CountEntries))),1)))
 
Last edited:
Upvote 0
if the formula above doesn't work for the Yes/No, then try this one:
Excel Formula:
=LET(
Entries,$C$3:$C$20,
CountEntries,COUNTA($C$3:$C$20),
CountYES,COUNTIF(Entries,"Yes"),
CountCritical,COUNTIF(Entries,"Critical"),
CountNo,COUNTIF(Entries,"No"),
CritAdj, 0.79 * IF(CountCritical>1,(CountCritical-1)/(CountEntries-1),0),
IF(CountCritical > 0,0.79 - CritAdj,
IF(CountNo>0,0.8+(0.2*(CountYES/CountEntries)),
1)))
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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