Excel Streetlight color code

Sergio

New Member
Joined
Dec 2, 2005
Messages
22
Hello,
Quick and simple question. I have a questionnaire with many categories/sections and each category have one, ten or more questions in it.
The answers are yes or no and they have to put an X on the corresponding column

what is the formula to count
if all of the question yes = green
70% to 80% of the questions yes = yellow and
below 70% of the questions yes= red

Thanks
Alex
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
So, you would have three Conditional Formatting Rules/formulas, one for each condition.

Formula for Green Rule (assuming range F1:F10):
Excel Formula:
=(COUNTIF(F1:F10,"yes")/COUNTA(F1:F10))=1

Formula for Yellow Rule (assuming range F1:F10):
Excel Formula:
=AND(COUNTIF(F1:F10,"yes")/COUNTA(F1:F10)>=0.7,COUNTIF(F1:F10,"yes")/COUNTA(F1:F10)<=0.8)

Formula for Red Rule (assuming range F1:F10):
Excel Formula:
=(COUNTIF(F1:F10,"yes")/COUNTA(F1:F10))<0.7

But what is supposed to happen if it is between 80% and 100%?
 
Upvote 0
So, you would have three Conditional Formatting Rules/formulas, one for each condition.

Formula for Green Rule (assuming range F1:F10):
Excel Formula:
=(COUNTIF(F1:F10,"yes")/COUNTA(F1:F10))=1

Formula for Yellow Rule (assuming range F1:F10):
Excel Formula:
=AND(COUNTIF(F1:F10,"yes")/COUNTA(F1:F10)>=0.7,COUNTIF(F1:F10,"yes")/COUNTA(F1:F10)<=0.8)

Formula for Red Rule (assuming range F1:F10):
Excel Formula:
=(COUNTIF(F1:F10,"yes")/COUNTA(F1:F10))<0.7

But what is supposed to happen if it is between 80% and 100%?
good question i think it will be yellow.... it can not be green if is not 100% completed.
 
Upvote 0
good question i think it will be yellow.... it can not be green if is not 100% completed.
If you want it yellow, then just change the yellow formula to:
Excel Formula:
=AND(COUNTIF(F1:F10,"yes")/COUNTA(F1:F10)>=0.7,COUNTIF(F1:F10,"yes")/COUNTA(F1:F10)<1)
 
Upvote 0
Solution

Forum statistics

Threads
1,215,110
Messages
6,123,148
Members
449,098
Latest member
Doanvanhieu

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