Sub Worksheet_Activate()
Dim L%, F, Famille, Codex
Application.ScreenUpdating = False
For L = 10 To 14
Famille = 0
For Each F In Worksheets
With Sheets(F.Name)
Famille = Famille + Application.SumIfs(.Range("AH10:AH55"), .Range("G10:G55"), Cells(L, "C"))
End With
Next F
Cells(L, "W") = Famille
Next L
For L = 20 To 48
Codex = 0
For Each F In Worksheets
With Sheets(F.Name)
Codex = Codex + Application.SumIfs(.Range("AH10:AH55"), .Range("K10:K55"), Cells(L, "C"))
End With
Next F
Cells(L, "W") = Codex
Next L
End Sub