Sub tri()
Dim plage As Range, I&, Lig&, tabl()
With Sheets("f1 (2)")
Lig = 5
For I = 6 To .Cells(Rows.Count, "B").End(xlUp).Row + 1
If .Cells(I, "B").MergeArea.Columns.Count > 1 Or I = .Cells(Rows.Count, "B").End(xlUp).Row + 1 Then
Set plage = Range(.Cells(Lig, "B"), .Cells(I - 1, "B")): I = I + 1: Lig = I
x = x + 1: ReDim Preserve tabl(1 To x): Set tabl(x) = plage
End If
Next
For I = 1 To UBound(tabl)
Debug.Print "fieldkey =" & tabl(I).Cells(1, 2).Address & " = (" & tabl(I).Cells(1, 2).Text & ") --->plage a filtrer par la colonne ""C"" =" & tabl(I).Address
'ActiveWorkbook.Worksheets("f1 (2)").Sort.SortFields.Clear
'ActiveWorkbook.Worksheets("f1 (2)").Sort.SortFields.Add Key:=tabl(I).Cells(1, 2)), _
'SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
'With ActiveWorkbook.Worksheets("f1 (2)").Sort
'.SetRange tabl(I)
'.Header = xlYes
'.MatchCase = False
'.Orientation = xlTopToBottom
'.SortMethod = xlPinYin
'.Apply
'End With
Next
End With
End Sub