Option Explicit
Dim ws As Worksheet, dlg&
Private Sub Job(i As Byte)
Dim An%, lg1&, lg2&, col%
Worksheets(i).Select
Rows("9:" & Rows.Count).Delete 'supprime toutes les lignes sous la ligne 8
Rows(8).ClearContents 'efface toutes les cellules de la ligne 8
An = Val(ActiveSheet.Name): lg2 = 8
For lg1 = 8 To dlg + 7
If ws.Cells(lg1, 20) = An Then
Rows(lg2).RowHeight = ws.Rows(lg1).RowHeight
ws.Cells(lg1, 5).Resize(, 16).Copy
Cells(lg2, 5).PasteSpecial -4163
lg2 = lg2 + 1
End If
Next lg1
[F8].Select
End Sub
Sub ventilation()
Dim i As Byte
Application.ScreenUpdating = 0: Set ws = Worksheets("Source")
dlg = ws.ListObjects("suividestextes3456").ListRows.Count
For i = 1 To 6: Job i: Next i: Application.CutCopyMode = 0
ws.Select: MsgBox "Ventilation effectuée."
End Sub