Private Sub Worksheet_Activate()
UsedRange.Columns(1) = UsedRange.Columns(1).Value 'les formules en colonne M sont recalculées
End Sub
Function SEM(cours As String, separateur As String)
Dim w As Worksheet, nom As String
For Each w In Worksheets
nom = UCase(w.Name)
If nom Like "SEM*#)" Then If Application.CountIf(w.Columns(3), cours) _
Then SEM = SEM & separateur & Val(Replace(Replace(nom, "SEM", ""), "(", ""))
Next
SEM = Mid(SEM, Len(separateur) + 1)
If IsNumeric(SEM) Then SEM = Val(SEM)
End Function