Sub Test()
Set Ws_Source = Worksheets("Planning général détaillé")
Set Coll_Redacteur = New Collection
With Ws_Source
DerLigne = .Range("G65536").End(xlUp).Row
DerCol = .Range("IV8").End(xlToLeft).Column + 1
Tabtemp = .Range(.Cells(7, 1), .Cells(DerLigne, DerCol)).Value
On Error Resume Next
For Ligne = 1 To UBound(Tabtemp, 1)
If Tabtemp(Ligne, [COLOR=Red]10[/COLOR]) = "" Or Tabtemp(Ligne, [COLOR=Red]10[/COLOR]) = "Rédacteur" Then
Tabtemp(Ligne, UBound(Tabtemp, 2)) = "x"
End If
Next
For Lgn = 1 To UBound(Tabtemp, 1)
If Tabtemp(Lgn, UBound(Tabtemp, 2)) <> "x" Then
Coll_Redacteur.Add Tabtemp(Lgn, [COLOR=Red]10[/COLOR]), CStr(Tabtemp(Lgn, [COLOR=Red]10[/COLOR]))
If Err.Number = 0 Then
.Copy After:=Sheets(Sheets.Count)
Set Ws_Cible = ActiveSheet
With Ws_Cible
Application.ScreenUpdating = False
'.CommandButton1.Delete
.Name = Tabtemp(Lgn, [COLOR=Red]10[/COLOR])
Traitement .Name
End With
End If
Err.Clear
End If
Next
On Error GoTo 0
End With
End Sub