Sub CreeFichiers()
Application.ScreenUpdating = False
chemin = ThisWorkbook.Path & "\"
With Sheets("Test")
Set liste = CreateObject("scripting.dictionary")
For Each u In .Range("G2:G" & .Range("G" & Rows.Count).End(xlUp).Row)
liste(u.Value) = Format(u.Offset(0, -2), "yyyy_mm")
Next u
For Each k In liste.keys
.Range("$A$1").CurrentRegion.AutoFilter Field:=7, Criteria1:=k
.Range("$A$1").CurrentRegion.SpecialCells(xlCellTypeVisible).Copy
Workbooks.Add
ActiveWorkbook.Sheets(1).Paste
ActiveWorkbook.SaveAs chemin & "Saisies_" & k & "_" & liste(k)
ActiveWorkbook.Close
.ShowAllData
Next k
End With
Application.ScreenUpdating = True
End Sub