Rob,
Here is an outline of the approach. Have twelve identical worksheets,
one for each month, and one summary sheet. In the monthly sheets list
all employees in column A, use column B for sickness days (a simple
COUNTIF formula - see below) and column C for sickness occasions - this
will need to be a User Defined Function (UDF). You can then have up to
31 columns for the days in that month.
Do all your staff work the same days (eg Monday to Friday)? If so, then
you can leave the weekends out of the sheet, but if not, then you will
have to use some character (eg "x") to indicate that the member of
staff was not expected in on a particular day, so that if someone was
off from Friday to Tuesday, this would not be counted as 2 occasions -
you would show it as S x x S S. All the other cells could be left
blank, so that you don't have a mass of data entry to do.
On your summary sheet you would have the same list of names and in
column B a formula like:
=SUM(Jan

ec!B4)
would add up all your sickness days for the whole year for each member
of staff. A similar formula would add up the occasions in column C. The
UDF on the monthly sheets would scan the columns from D to AH and count
all transitions from S to blank as being a sickness occasion. Here's
an example of a UDF to do this:
Function occasions(days As Range) As Integer
occasions = 0
If Range("B" & days.Row).Value = 0 Then Exit Function
For i = 1 To 31
If days(i).Value = "S" And _
days(i + 1).Value = "" Then occasions = occasions + 1
Next i
End Function
You would use this, for example in cell C4 as:
=occasions(D4:AI4)
and the formula in B4 would be:
=COUNTIF(D4:AH4,"S")
Note that the range for the occasions formula extends to AI. This does
not check previous or following months' sheets - rather, it treats each
month separately. This may overstate the occasions, as a person who was
off sick on the last day of one month and the first day of the next
month would be counted as having 2 occasions of sickness. Perhaps
someone else can advise you of a way around this, as I'm going on
holiday first thing on Wednesday morning and don't have time to look
into this at the moment.
You would copy these two formulae down columns B and C for as many
names as you have on the sheet. If you have new staff joining, just add
their names to the bottom of the sheets from that month onwards (plus
on the summary sheet) and copy the formulae down further.
Hope this helps.
Pete