Sub filtres()
Dim xFilter As AutoFilter, TargetFilter As Filter
Dim TargetField$, xOut$, OutRng As Range
If ActiveSheet.AutoFilterMode = False Then
Application.StatusBar = False
Exit Sub
End If
Set OutRng = Range("B3")
Set xFilter = ActiveSheet.AutoFilter
For i = 1 To xFilter.Filters.Count
TargetField = xFilter.Range.Cells(1, i).Value
Set TargetFilter = xFilter.Filters(i)
If TargetFilter.On Then
On Error GoTo OutNext
xOut = xOut & TargetField & TargetFilter.Criteria1 & " / "
Select Case TargetFilter.Operator
Case xlAnd
xOut = xOut & "et / " & TargetField & TargetFilter.Criteria2 & " / "
Case xlOr
xOut = xOut & "ou / " & TargetField & TargetFilter.Criteria2 & " / "
Case xlBottom10Items
xOut = xOut & " (bottom 10 items)" & " / "
Case xlBottom10Percent
xOut = xOut & " (bottom 10%)"
Case xlTop10Items
xOut = xOut & " (top 10 items)"
Case xlTop10Percent
xOut = xOut & " (top 10%)"
End Select
End If
Next
OutRng.Value = xOut
OutNext:
xOut = xOut & TargetField & "=Filtres multiples" & " / "
ErrorHandler:
Resume Next
End Sub