Function SEM(cours As String, separateur As String)
Application.Volatile
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(nom, "SEM", ""))
Next
SEM = Mid(SEM, Len(separateur) + 1)
If IsNumeric(SEM) Then SEM = Val(SEM)
End Function