Private Sub Worksheet_Activate()
Dim deb As Range, pas%, tablo, ncol%, resu, i&, ii&, jj%, j%, n&
Set deb = [G4]
pas = 11
With Sheets("JUPILER PRO LEAGUE")
tablo = .Range("D3", .Range("K" & .Rows.Count).End(xlUp))
ncol = UBound(tablo, 2)
ReDim resu(1 To UBound(tablo) + Application.CountIf(.[F:F], "JOURNEE*"), 1 To ncol - 2)
End With
Application.ScreenUpdating = False
deb.Resize(pas - 1, ncol - 2).ClearContents
For i = 1 To UBound(tablo)
ii = ii + 1
If i Mod pas = 1 Then
If i > 1 Then
deb.EntireRow.Copy deb(ii).EntireRow
deb(2).Resize(pas - 2, ncol - 2).Copy deb(ii + 1)
End If
deb(ii, 12).Resize(pas - 1).BorderAround Weight:=xlMedium
n = n + 1
resu(ii, 1) = "JOURNEE"
resu(ii, ncol - 2) = n
Else
jj = 0
For j = 1 To ncol
jj = jj + 1
resu(ii, jj) = tablo(i, j)
If j = 1 Then j = 2
If j = ncol - 2 Then j = ncol - 1
Next j
End If
If i Mod pas = pas - 1 Then i = i + 1: ii = ii + 2
Next i
ii = ii - 2
deb.Resize(ii, ncol - 2) = resu
deb.Offset(ii).EntireRow.Resize(Rows.Count - ii - deb.Row + 1).Delete
With UsedRange: End With
End Sub