1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
For l = 15 To 65536 'l est pour le nombre de ligne de la matrice de recherche moi ça commen de la ligne 15 à 65536
For c = 0 To 11 'c pour est le nombre de colonne de la matrice de recherche
cell = Cells(l, 5 + c).Address 'le 5 est pour le numéro de la colonne où commence la matrice de recherche
If Cells(l, 5 + c) = Application.WorksheetFunction.Large(Range("e15:p65536"), 1) Then
adresse1 = Cells(l, 5 + c)
End If
If Cells(l, 5 + c) = Application.WorksheetFunction.Large(Range("e15:p65536"), 2) Then
adresse2 = Cells(l, 5 + c)
End If
If Cells(l, 5 + c) = Application.WorksheetFunction.Large(Range("e15:p65536"), 3) Then
adresse3 = Cells(l, 5 + c)
End If
If Cells(l, 5 + c) = Application.WorksheetFunction.Large(Range("e15:p65536"), 4) Then
adresse4 = Cells(l, 5 + c)
End If
If Cells(l, 5 + c) = Application.WorksheetFunction.Large(Range("e15:p65536"), 5) Then
adresse5 = Cells(l, 5 + c)
End If
If Range("aa2") <> "" And Range("aa3") <> "" And Range("aa4") <> "" And Range("aa5") <> "" And Range("aa6") <> "" Then
GoTo fin
End If
Next c
Next l |
Partager