How about this
Option Explicit
Private Sub Workbook_SheetSelectionChange(ByVal sh As Object, ByVal Target As Range)
Const WS_RANGE As String = "A:A" '<== change to suit
Dim RowNum As Long
Dim RecLeave As Long
Dim PHLeave As Long
' and the others
On Error GoTo ws_exit
Application.EnableEvents = False
If Not Intersect(Target, sh.Range(WS_RANGE)) Is Nothing Then
With Target
If .Row > 10 Then
RecLeave = 0
PHLeave = 0
' and the others
For Each sh In ThisWorkbook.Worksheets
RowNum = 0
On Error Resume Next
RowNum = Application.Match(.Value, sh.Columns(1), 0)
On Error GoTo 0
If RowNum > 0 Then
RecLeave = RecLeave + Application.CountIf(sh.Rows(RowNum), "R")
PHLeave = PHLeave + Application.CountIf(sh.Rows(RowNum), "PH")
' and the others
End If
Next sh
End If
MsgBox "Tallies for " & .Value & ":" & vbNewLine & _
vbTab & "Recreation leave: " & RecLeave & vbNewLine & _
vbTab & "Public holiday: " & PHLeave & vbNewLine
' and the others
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub
This is workbook event code.
To input this code, right click on the Excel icon on the worksheet
(or next to the File menu if you maximise your workbooks),
select View Code from the menu, and paste the code