Bonsoir jmd, christian77,
Essaie ceci :
Option Explicit
Sub test()
Dim dico As Object, i As Long, e, txt As String
Set dico = CreateObject("Scripting.Dictionary")
dico.CompareMode = 1
Application.ScreenUpdating = False
With Sheets("BDD").Cells(1).CurrentRegion
For i = 2 To .Rows.Count
If .Cells(i, 5).Value Like "A0*" Or .Cells(i, 5).Value Like "B0*" Then
txt = Left$(.Cells(i, 5).Value, 2)
Else
txt = .Cells(i, 5).Value
End If
If Not dico.exists(txt) Then
Set dico(txt) = .Rows(1)
End If
Set dico(txt) = Union(dico(txt), .Rows(i))
Next
End With
For Each e In dico.keys
If Not IsSheetExists(e) Then
Sheets.Add(after:=Sheets(Sheets.Count)).Name = e
End If
With Sheets(e).Cells(1)
.CurrentRegion.Clear
dico(e).Copy .Cells
With .CurrentRegion
With .Rows(1)
.HorizontalAlignment = xlCenter
End With
.Columns.ColumnWidth = Array(11, 11, 11, 11, 17)
End With
End With
Next
Application.ScreenUpdating = True
End Sub
Function IsSheetExists(ByVal sn As String) As Boolean
On Error Resume Next
IsSheetExists = Len(Sheets(sn).Name)
End Function
klin89