Rolling Percentage issue

mattbird

Active Member
Joined
Oct 15, 2013
Messages
305
Office Version
  1. 2016
Hi,

I am trying to input a formula to provide a rolling percentage, but can't seem to figure it out:

I have 12 cells D4:O4 and in the cell I have a number or letter ie:

1= attended
0= did not attend
A= apologies
D= stand in

in cell T4 i would like it to return a percentage. If I place a 1 or 'D' in D4 I want it to return 100%, if I then place a 1 or 'D' in E4 I want it to return 100% and so on all the way to O4. However, if I place a 0 or 'A' in any of the boxes lets say in F4 it will work out the percentage.

Hope this makes sense

Thanks Matt
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
How about
Excel Formula:
=SUM(COUNTIFS(D4:O4,{1,"D"}))/COUNTIFS(D4:O4,"<>")
 
Upvote 0
How about
Excel Formula:
=SUM(COUNTIFS(D4:O4,{1,"D"}))/COUNTIFS(D4:O4,"<>")
Thanks for the help :)

The formula sort of works. Adding 1 or D to the cells returns 100%, but if I add 0 or A it returns the over all percentage which is not what I need.

if 11 out of the 12 cells have 1 or D the percentage would return 92% (rounder up with no decimal places), if D4 and E4 has 1 or D it would return 100% if the next cell F4 had a 0 or A it would return 92% and this would remain a 92% until another cell had 0 or A entered in it.

Also if there is nothing in any of the cells I need it to show 0%.

Thanks
 
Upvote 0
Maybe
Excel Formula:
=IF(COUNTIFS(D4:O4,"")=12,0,SUM(COUNTIFS(D4:O4,{1,"D",""}))/12)
 
Upvote 0
Solution
Thanks for the help :)

The formula sort of works. Adding 1 or D to the cells returns 100%, but if I add 0 or A it returns the over all percentage which is not what I need.

if 11 out of the 12 cells have 1 or D the percentage would return 92% (rounder up with no decimal places), if D4 and E4 has 1 or D it would return 100% if the next cell F4 had a 0 or A it would return 92% and this would remain a 92% until another cell had 0 or A entered in it.

Also if there is nothing in any of the cells I need it to show 0%.

Thanks
Trying to think of away to explain this better.....
If I place a 0 or A in the first cell D4 it returns 0%, but I need it to return of example 92%. if in E4 I do the same it will return 83% and so on down to 0%. however, if I placed 1 or D in the next cell F4 it would remain at 83%.

Example 1
D4 E4 F4 G4 H4 I4 J4 K4 L4 M4 N4 O4 T4
1 1 1 1 D = 100%

or

D4 E4 F4 G4 H4 I4 J4 K4 L4 M4 N4 O4
1 1 1 1 D D 1 1 1 D 1 1 = 100%

Example 2
D4 E4 F4 G4 H4 I4 J4 K4 L4 M4 N4 O4
0 A 1 1 D = 83%

or

D4 E4 F4 G4 H4 I4 J4 K4 L4 M4 N4 O4
1 1 1 1 D 0 1 1 A 1 D 1 = 83%

Does this make sense?
 
Upvote 0
That's what the formula in post#4 does.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,087
Messages
6,123,050
Members
449,092
Latest member
ikke

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