Sub Worksheet_Activate()
Dim DL%, L%, i%, Tablo, Sortie
DL = Sheets("Data").[D1000].End(xlUp).Row
Tablo = Sheets("Data").Range("B19:P" & DL)
ReDim Sortie(1 To 100, 1 To 7)
[B5:J1000].ClearContents
L = 1
For i = 1 To UBound(Tablo)
If Tablo(i, 1) <> "" Then
Sortie(L, 1) = Tablo(i, 1)
Sortie(L, 2) = Right(Tablo(i, 11), 1) ' salle
Sortie(L, 6) = Sortie(L, 2)
Sortie(L, 3) = Tablo(i, 15) 'titre
Sortie(L, 7) = Tablo(i, 15)
Sortie(L, 5) = Tablo(i, 8)
L = L + 1
End If
Next i
[B5].Resize(UBound(Sortie, 1), UBound(Sortie, 2)) = Sortie
Range("B5:H" & L + 4).Sort Key1:=[F5], Order1:=xlAscending, Header:=xlNo
End Sub