Si tu préfères la méthode Find...FindNext
'----------------------------------------------
Sub test()
Dim V As Double, A As Integer, T As String
Dim S As Integer, Adr As String
'Tu détermine la valeur recherchée dans la feuille
V = 55000
With Worksheets("Feuil2") 'Nom feuille à adapter
With .Range("A1:A" & .Range("A65536").End(xlUp).Row)
S = Application.CountIf(.Cells, V)
Set trouve = .Find(What:=V, LookIn:=xlValues, _
lookat:=xlWhole)
If Not trouve Is Nothing Then
Adr = trouve.Address
Do
A = A + 1
If A > S - 3 Then
T = trouve.Row & ", " & T
End If
Set trouve = .FindNext(trouve)
Loop Until trouve.Address = Adr
End If
End With
End With
If T <> "" Then
T = Left(T, Len(T) - 2)
MsgBox "Les 3 dernières lignes, s'il y a lieu , " & _
"par odre décroissant : " & T
Else
MsgBox "Rien trouvé."
End If
End Sub
'----------------------------------------------
MichD
------------------------------------------
"MichD" a écrit dans le message de groupe de discussion : j86vo7$pv9$1...@speranza.aioe.org...