Bonjour,
Désolé pour le retard de ma réponse mais j'ai eu quelque souci avec mon ordi.
Avant tout je voudrais te remercier car la macro est excellente.
Cependant, quand la liste de Numero dans la feuille "RB" a environ 8000 lignes la macro fait erreur d'execution.
Dans la macro j'ai change le 5 pour 8000 pour pouvoir prendre en compte tous les lignes.
Je vous envoie le code:
Option Explicit
Sub recherche()
Dim J As Long
Dim Tablo
Dim Indice As Integer
Dim F1 As Worksheet, F2 As Worksheet
Dim Cel As Range
Dim Depart As String
Columns("A:E").Clear
Indice = 1
ReDim Tablo(1 To 8000, 1 To Indice)
Tablo(1, Indice) = "Numéro"
Tablo(2, Indice) = "Forme"
Tablo(3, Indice) = "Couleur"
Tablo(4, Indice) = "Type"
Tablo(5, Indice) = "Description"
Set F1 = Sheets("RA")
Set F2 = Sheets("RB")
For J = 2 To F1.Range("B" & Rows.Count).End(xlUp).Row
Set Cel = F2.Columns("D").Find(what:=F1.Range("B" & J), LookIn:=xlValues, lookat:=xlPart)
If Not Cel Is Nothing Then
Depart = Cel.Address
Do
Indice = Indice + 1
ReDim Preserve Tablo(1 To 8000, 1 To Indice)
Tablo(1, Indice) = F1.Range("B" & J)
Tablo(2, Indice) = Cel.Offset(0, -3)
Tablo(3, Indice) = Cel.Offset(0, -2)
Tablo(4, Indice) = Cel.Offset(0, -1)
Tablo(5, Indice) = F1.Range("A" & J)
Set Cel = F2.Columns("D").FindNext(Cel)
Loop While Depart <> Cel.Address
End If
Next J
Range("A1").Resize(UBound(Tablo, 2), 8000) = Application.Transpose(Tablo)
End Sub
Merci d'avance.