counting absentees

  • Thread starter Thread starter Dwayne Gunnels
  • Start date Start date
D

Dwayne Gunnels

name wk1 wk2 wk3 wk4 wk5 wk6 counting backwards, wks missed
a x x x x x A 1
b x x A A x x 0
c x x x x x A 1
d x x x x x x 0
e x x x A A A 3
f x x x x x x 0
g A A A A x x 0
h x x x x A x 0
i x x x x x x 0
j x x A A A x 0
k x x x x x x 0
l x x x A x x 0
m x x x x A A 2

Sorry the spreadsheet didn't copy well!
The answer is in the last column.
This will be a 52 week chart, renewable each year.
Question I'm trying to answer: How many weeks beginning with this
week, has the person missed consecutively? Once an X is reached the
count stops.
Counting from wk6 toward wk 1.
 
name wk1 wk2 wk3 wk4 wk5 wk6 counting backwards, wks missed
a x x x x x A 1
b x x A A x x 0
c x x x x x A 1
d x x x x x x 0
e x x x A A A 3
f x x x x x x 0
g A A A A x x 0
h x x x x A x 0
i x x x x x x 0
j x x A A A x 0
k x x x x x x 0
l x x x A x x 0
m x x x x A A 2

Sorry the spreadsheet didn't copy well!
The answer is in the last column.
This will be a 52 week chart, renewable each year.
Question I'm trying to answer: How many weeks beginning with this
week, has the person missed consecutively? Once an X is reached the
count stops.
Counting from wk6 toward wk 1.

One way

Sub countemupinrev()
For i = 1 To 13
For ii = 6 To 1 Step -1
If Cells(i, ii) = "x" Then
MsgBox i
Cells(i, "H") = 6 - ii
Exit For
End If
Next ii
Next i
End Sub
 
Back
Top