Bonjour,
Avec une fonction perso en VBA :
Function FREQUENCEPERSO(PlgRecherche As Range, PlgExclure As Range, PlgDecaler As Long, Critere As String) As Long
Dim Cel1 As Range
Dim Cel2 As Range
Dim Dico As Object
Set Dico = CreateObject("Scripting.Dictionary")
For Each Cel1 In PlgRecherche
Set Cel2 = PlgExclure.Find(Cel1.Value, , xlValues, xlWhole)
If Cel2 Is Nothing Then
If Critere <> "" Then
If Cel1.Offset(, PlgDecaler).Value = Critere Then Dico(Cel1.Value) = Cel1.Value
Else
Dico(Cel1.Value) = Cel1.Value
End If
End If
Next Cel1
FREQUENCEPERSO = Dico.Count
End Function
utilisable de cette façon dans Excel :
Pour "Fréquence dans liste 1"
=FREQUENCEPERSO(Liste_1;Exclusion;1;"")
Pour "Fréquence dans liste 1 avec AA dans liste 2"
=FREQUENCEPERSO(Liste_1;Exclusion;1;"AA")
Note, "PlgDecaler" indique l'offset pour la liste 2 (Critere)