Sub ventiler()
Dim ws As Worksheet
Dim ShtName As String
Dim Tablo
Dim DerLgn As Integer
Dim Lgn As Integer
Dim C
Application.ScreenUpdating = False
Set C = New Collection
With Worksheets("liste")
DerLgn = .Cells(.Rows.Count, 1).End(xlUp).Row
With .Range(.Cells(1, 1), .Cells(DerLgn, 2))
.Sort key1:=.Cells(2, 1), order1:=xlAscending, Header:=xlYes
Tablo = .Value
End With
On Error Resume Next
For Lgn = 2 To UBound(Tablo, 1)
ShtName = Tablo(Lgn, 1)
C.Add ShtName, CStr(ShtName)
If Err.Number = 0 Then
If Not Feuille_Existe(ShtName) And ShtName <> "" Then
Sheets.Add Count:=1, after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = ShtName
End If
End If
Err.Clear
Next
End With
Worksheets("liste").Activate
set C=Nothing
Application.ScreenUpdating = True
End Sub