Bonjour!
Sub ventiller()
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim w(0 To 12) As Worksheet, i&, n&(0 To 12), m%
If Target.Row = 1 And Target.Column = 8 Then
For i = 0 To 12
Set w(i) = Worksheets(i + 1)
If i > 0 Then
w(i).Range(w(i).Cells(4, 1), w(i).Cells(Rows.Count, 9)).ClearContents
n(i) = 4
Else
n(i) = WorksheetFunction.Max(4, w(i).Cells(Rows.Count, 1).End(xlUp).Row + 1)
End If
Next i
For i = 4 To n(0)
m = w(0).Cells(i, 8)
w(0).Rows(i).Copy Destination:=w(m).Cells(n(m), 1)
n(m) = n(m) + 1
Next i
End If
End Sub
J'ai plavé ce code dans un module pour l'adapter mais je trouve quelques problèmes à le faire, merci de le corriger, à bientôt