Formula to calculate team attendance %

mattbird

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

I have been building an attendance log, which calculates an individuals attendance, however I would like it to also calculate the teams attendance in column 'W'.

I have placed all the formulas in their cells (Row 11 only), as well as the results for all individuals etc.

I initial had a sum that added the individual % together, however this does not always work especially is there are multiple team members attending on the same day etc, as you can see BRAVO team would be 217%, but should be 100%, as a member of the team has attend at each of the 6 meetings.

I hope this make sense?

Your help is greatly appreciated

ABDEFGHIJKLMNOPQRSTUVW
TeamNameAprMayJunJulAugSepOctNovDecJanFebMarAttendance
'1'
Deputy
'D'
Apologies
'A'
DNA
'0'
Not Required
'N'
Fx Total
(P:S)
Individual
Attendance %
Team Attendance %
11ALPHAJimA111115
Excel Formula:
=COUNTIF($D11:$O11,1)
0
Excel Formula:
=COUNTIF($D11:$O11,"D")
1
Excel Formula:
=COUNTIF($D11:$O11,"A")
0
Excel Formula:
=COUNTIF($D11:$O11,"0")
0
Excel Formula:
=COUNTIF($D11:$O11,"N")
6
Excel Formula:
=SUM(P11:S11)
83%
Excel Formula:
=IFERROR(IF(COUNTIFS($D11:$O11,"")=12,0,SUM(COUNTIFS($D11:$O11,{1,"D"}))/$U11),0)
100%
12ALPHAClare1AA11A30300650%
13BRAVOSiN11N11400024100%100%
14BRAVOJohn0DA11131110667%
15BRAVOLiz1NN01A20112450%
16CHARLIEJess00000110050617%67%
17CHARLIEPaul111AA030210650%
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
try this
-----------------------
Book1
BCDEFGHIJKLMNOPQRSTUVW
10TeamNameAprMayJunJulAugSepOctNovDecJanFebMarAttendanceDeputyApologiesDNANot RequiredFx TotalIndividualTeam Attendance %
111DA0N(P:S)Attendance %
12
13ALPHAJimA1111150100683%67%
14ALPHAClare1AA11A30300650%67%
15BRAVOSiN11N11400024100%71%
16BRAVOJohn0DA11131110667%71%
17BRAVOLiz1NN01A20112450%71%
18CHARLIEJess00000110050617%33%
19CHARLIEPaul111AA030210650%33%
Sheet1
Cell Formulas
RangeFormula
P13:T19P13=COUNTIF($D13:$O13,P$11)
U13:U19U13=SUM(P13:S13)
V13:V19V13=IFERROR(IF(COUNTIFS($D13:$O13,"")=12,0,SUM(P13,Q13)/$U13),0)
W13:W19W13=IFERROR(IF(COUNTIFS($D13:$O13,"")=12,0,SUM(SUMIF($B$13:$B$19,$B13,P$13:P$19),SUMIF($B$13:$B$19,$B13,Q$13:Q$19))/SUMIF($B$13:$B$19,$B13,$U$13:$U$19)),0)
 
Upvote 0
try this
-----------------------
Book1
BCDEFGHIJKLMNOPQRSTUVW
10TeamNameAprMayJunJulAugSepOctNovDecJanFebMarAttendanceDeputyApologiesDNANot RequiredFx TotalIndividualTeam Attendance %
111DA0N(P:S)Attendance %
12
13ALPHAJimA1111150100683%67%
14ALPHAClare1AA11A30300650%67%
15BRAVOSiN11N11400024100%71%
16BRAVOJohn0DA11131110667%71%
17BRAVOLiz1NN01A20112450%71%
18CHARLIEJess00000110050617%33%
19CHARLIEPaul111AA030210650%33%
Sheet1
Cell Formulas
RangeFormula
P13:T19P13=COUNTIF($D13:$O13,P$11)
U13:U19U13=SUM(P13:S13)
V13:V19V13=IFERROR(IF(COUNTIFS($D13:$O13,"")=12,0,SUM(P13,Q13)/$U13),0)
W13:W19W13=IFERROR(IF(COUNTIFS($D13:$O13,"")=12,0,SUM(SUMIF($B$13:$B$19,$B13,P$13:P$19),SUMIF($B$13:$B$19,$B13,Q$13:Q$19))/SUMIF($B$13:$B$19,$B13,$U$13:$U$19)),0)
Hi,

Thanks for your help.

I don't think that the % in row 'W' are correct:

As ALPHA and BRAVO teams should be 100% attendance and CHARLIE team should be 67% attendance?

Key:
1 = attended
0 = did not attend
A = apologies
D = deputy
N = not required

for example: BRAVO team, individually they have not attended all of the meeting, however together there has been a member of BRAVO team at each meeting so the would be 100% attendance not 71%

A
BDEFGHIJKLMNOPQRSTUVW
TeamNameAprMayJunJulAugSepOctNovDecJanFebMarAttendance
'1'
Deputy
'D'
Apologies
'A'
DNA
'0'
Not Required
'N'
Fx Total
(P:S)
Individual
Attendance %
Team Attendance %
11ALPHAJimA111115
Excel Formula:
=COUNTIF($D11:$O11,1)
0
Excel Formula:
=COUNTIF($D11:$O11,"D")
1
Excel Formula:
=COUNTIF($D11:$O11,"A")
0
Excel Formula:
=COUNTIF($D11:$O11,"0")
0
Excel Formula:
=COUNTIF($D11:$O11,"N")
6
Excel Formula:
=SUM(P11:S11)
83%
Excel Formula:
=IFERROR(IF(COUNTIFS($D11:$O11,"")=12,0,SUM(COUNTIFS($D11:$O11,{1,"D"}))/$U11),0)
100%
12ALPHAClare1AA11A30300650%
13BRAVOSiN11N11400024100%100%
14BRAVOJohn0DA11131110667%
15BRAVOLiz1NN01A20112450%
16CHARLIEJess00000110050617%67%
17CHARLIEPaul111AA030210650%
As you can see the RED 1's (highlighted for example only) show a person at each meeting from Apr-Sep and the BLUE 1's (example only) shown were other team member attending the same meeting. Overall there has only been 6 meeting so far and BRAVO team has attended each meeting, just a different person, so it should read 100% attendance in row 'W'.

Does this make sense?
 
Upvote 0
How about
Fluff.xlsm
ABCDEFGHIJKLMNOPQRSTUVW
10TeamNameAprMayJunJulAugSepOctNovDecJanFebMarAttendance '1'Deputy 'D'Apologies 'A'DNA '0'Not Required 'N'Fx Total (P:S)Individual Attendance %Team Attendance %
1111ALPHAJimA1111150100683%100%
1212ALPHAClare1AA11A30300650%100%
1313BRAVOSiN11N11400024100%100%
1414BRAVOJohn0DA11131110667%100%
1515BRAVOLiz1NN01A20112450%100%
1616CHARLIEJess00000110050617%67%
1717CHARLIEPaul111AA030210650%67%
Data
Cell Formulas
RangeFormula
P11P11=COUNTIF($D11:$O11,1)
Q11Q11=COUNTIF($D11:$O11,"D")
R11R11=COUNTIF($D11:$O11,"A")
S11S11=COUNTIF($D11:$O11,"0")
T11T11=COUNTIF($D11:$O11,"N")
U11U11=SUM(P11:S11)
V11:V17V11=SUM(P11:Q11)/U11
W11:W17W11=SUM(SIGN(MMULT(TRANSPOSE(ROW($B$11:$B$17)^0),($B$11:$B$17=B11)*(($D$11:$O$17=1)+($D$11:$O$17="D")))))/SUM(P11:T11)
 
Upvote 0
How about
Fluff.xlsm
ABCDEFGHIJKLMNOPQRSTUVW
10TeamNameAprMayJunJulAugSepOctNovDecJanFebMarAttendance '1'Deputy 'D'Apologies 'A'DNA '0'Not Required 'N'Fx Total (P:S)Individual Attendance %Team Attendance %
1111ALPHAJimA1111150100683%100%
1212ALPHAClare1AA11A30300650%100%
1313BRAVOSiN11N11400024100%100%
1414BRAVOJohn0DA11131110667%100%
1515BRAVOLiz1NN01A20112450%100%
1616CHARLIEJess00000110050617%67%
1717CHARLIEPaul111AA030210650%67%
Data
Cell Formulas
RangeFormula
P11P11=COUNTIF($D11:$O11,1)
Q11Q11=COUNTIF($D11:$O11,"D")
R11R11=COUNTIF($D11:$O11,"A")
S11S11=COUNTIF($D11:$O11,"0")
T11T11=COUNTIF($D11:$O11,"N")
U11U11=SUM(P11:S11)
V11:V17V11=SUM(P11:Q11)/U11
W11:W17W11=SUM(SIGN(MMULT(TRANSPOSE(ROW($B$11:$B$17)^0),($B$11:$B$17=B11)*(($D$11:$O$17=1)+($D$11:$O$17="D")))))/SUM(P11:T11)
Hi Fluff,

Thanks for your response and help.

I have tried the formula in cell 'W' however it returns #VALUE!?
 
Upvote 0
You may need to confirm it with Ctrl Shift Enter, rather than just Enter.
 
Upvote 0
You may need to confirm it with Ctrl Shift Enter, rather than just Enter.
Hi Fluff,

I have 2 questions, if that ok?

Q1 - I've notice if I filling in a column and leave a cell black it affects the percentage for that row, how do I stop this, so blank cells don't affect the result?

which brings me on to my next question.

Q2 - The current formula works for each individual row, and produces a result for each row in column 'W'. How would I get one result for each team in one cell?


Example: If I merged cell W11:W12 for Alpha, W13:W15 for Bravo, W16:W17 for Charlie or a different cell all together ie table below:

AB
20Alpha team100%
21Bravo team100%
22Charlie team67%

Thanks for your continued help.
 
Upvote 0
For part 2 use
Fluff.xlsm
ABCDEFGHIJKLMNOPQRSTUVW
10TeamNameAprMayJunJulAugSepOctNovDecJanFebMarAttendance '1'Deputy 'D'Apologies 'A'DNA '0'Not Required 'N'Fx Total (P:S)Individual Attendance %Team Attendance %
1111ALPHAJimA111115010060.83333333100%
1212ALPHAClare1AA11A3030060.5 
1313BRAVOSiN11N114000241100%
1414BRAVOJohn0DA1113111060.66666667 
1515BRAVOLiz1NN01A2011240.5 
1616CHARLIEJess0000011005060.1666666767%
1717CHARLIEPaul111AA03021060.5 
Data
Cell Formulas
RangeFormula
P11P11=COUNTIF($D11:$O11,1)
Q11Q11=COUNTIF($D11:$O11,"D")
R11R11=COUNTIF($D11:$O11,"A")
S11S11=COUNTIF($D11:$O11,"0")
T11T11=COUNTIF($D11:$O11,"N")
U11U11=SUM(P11:S11)
V11:V17V11=SUM(P11:Q11)/U11
W11:W17W11=IF(COUNTIFS(B$11:B11,B11)=1,SUM(SIGN(MMULT(TRANSPOSE(ROW($B$11:$B$17)^0),($B$11:$B$17=B11)*(($D$11:$O$17=1)+($D$11:$O$17="D")))))/SUM(P11:T11),"")
Press CTRL+SHIFT+ENTER to enter array formulas.


For part 1: How can you leave a cell blank, surely the person turned up or didn't.
 
Upvote 0

Forum statistics

Threads
1,215,088
Messages
6,123,057
Members
449,091
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