=SOMME(N(FREQUENCE(SI(NB.SI(DECALER($D$4:$H$793;LIGNE($D$4:$H$793)-LIGNE($D$4:$H$4);;1);D4:H4);LIGNE($D$4:$H$793));LIGNE($D$4:$H$793))=COLONNES(D4:H4)))
C'est également mon avis.[...] Victor21 , je pense que tu n'avait pas compris , je voulais parler des combinaison de 5 chiffres.[...]
Bonjour le Forum,
Bonjour seydou86, Victor21, CISCO,
CISCO je ne trouve pas les même résultat que toi peux tu regarder mon fichier ... et me dire.
Merci d'avance
Cordialement
=SOMME(--(FREQUENCE(SI(NB.SI(DECALER($D$1:$H$1;LIGNE($3:$792);;1);D4:H4);LIGNE($4:$793));LIGNE($4:$793))=5))
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [T]) Is Nothing Then Exit Sub
Dim tablo, ncol%, a&(), b&(), d As Object, decal&, i&, lig, x$, j%
tablo = [T] 'matrice, plus rapide
ncol = UBound(tablo, 2)
ReDim a(1 To UBound(tablo))
ReDim b(1 To UBound(tablo))
Set d = CreateObject("Scripting.Dictionary")
decal = [T].Row - 1
With Application
For i = 1 To UBound(tablo)
lig = .Index(tablo, i, 0)
x = ""
For j = 1 To ncol
x = x & " " & .Small(lig, j) 'PETITE.VALEUR
Next
If d.exists(x) Then
a(i) = i + decal
If b(d(x)) = 0 Then b(d(x)) = d(x) + decal
Else: d(x) = i: End If
Next
End With
ThisWorkbook.Names.Add "PremiereLigneDoublon", b 'nom défini
ThisWorkbook.Names.Add "AutreLigneDoublon", a 'nom défini
End Sub
SOMME(--(FREQUENCE(SI(ESTNUM(EQUIV(D$4:H$793;D4:H4;0));LIGNE($4:$793));LIGNE($4:$793))=5))
Private Sub Worksheet_Change(ByVal Target As Range)
Dim P As Range, nlig&, ncol%, decal&, a%(), b%(), d As Object, i&, lig, x$, j%
Set P = [deb].CurrentRegion
nlig = P.Rows.Count
If Intersect(Target, P.Resize(nlig + 1)) Is Nothing Then Exit Sub
ncol = P.Columns.Count
decal = P.Row - 1
ReDim a(1 To nlig + decal, 1 To 1): ReDim b(1 To nlig + decal, 1 To 1)
Set d = CreateObject("Scripting.Dictionary")
For i = 1 To nlig
lig = P.Rows(i)
tri lig, 1, ncol
x = ""
For j = 1 To ncol
x = x & " " & lig(1, j)
Next
If d.exists(x) Then
a(i + decal, 1) = 1
b(d(x), 1) = 1
Else: d(x) = i + decal: End If
Next
ThisWorkbook.Names.Add "PremiereLigneDoublon", b 'nom défini
ThisWorkbook.Names.Add "AutreLigneDoublon", a 'nom défini
End Sub
Sub tri(a, gauc, droi) ' Quick sort
Dim ref, g, d, temp
ref = a(1, (gauc + droi) \ 2)
g = gauc: d = droi
Do
Do While a(1, g) < ref: g = g + 1: Loop
Do While ref < a(1, d): d = d - 1: Loop
If g <= d Then
temp = a(1, g): a(1, g) = a(1, d): a(1, d) = temp
g = g + 1: d = d - 1
End If
Loop While g <= d
If g < droi Then Call tri(a, g, droi)
If gauc < d Then Call tri(a, gauc, d)
End Sub