REKLAMA

Filtrowanie.xls

Excel - Pokaż jakie zostało wybrane kryterium filtra

Nie wiem, czy moja propozycja jest tym, czego oczekiwałeś, bo kryteria filtra można definiować w różny sposób a ich odczytanie nie zawsze jest łatwe. Moja propozycja to taka funkcja UDF: Function KrytFiltra() As String Application.Volatile With Application.ThisCell.Parent.AutoFilter.Filters(1) If .On Then If .Operator = 0 Then KrytFiltra = .Criteria1 ElseIf .Operator = xlOr Then If .Criteria1 <> "" And .Criteria2 = "" Then KrytFiltra = .Criteria1 Else KrytFiltra = "Różne" End If Else KrytFiltra = "Różne" End If End If End With End Function Zapisz plik w formacie .xlsm


Pobierz plik - link do postu

&quot; Filtr &quot; , &quot; Różne &quot; , &quot; &amp; lt; ---- tutaj pokaż jakie zostalo wybrane kryterium, jeżeli wybarno więcaj jak jedno kryterium wówczac pokaż &quot; &quot; Różne &quot; &quot; &quot;
&quot; Filtr1 &quot;
&quot; Filtr2 &quot;
&quot; Filtr3 &quot;
&quot; Filtr4 &quot;
&quot; Filtr5 &quot;
&quot; Filtr6 &quot;
&quot; Filtr7 &quot;
&quot; Filtr8 &quot;
&quot; Filtr9 &quot;
&quot; Filtr10 &quot;