Aide pour index(Match()) en vba

lemarcheurfou

XLDnaute Nouveau
Bonjours à tous,
J'ai un petit problème pour adapter l'ensemble de fonction index(Match()).
Je voudrais qu'il fasse une recherche et retourne le résultat dans une colonne.
Je vous met en pièce jointe un exemple avec la macro que j'ai commencé à faire hier.

Merci pour votre aide.
 

Pièces jointes

  • test.xlsm
    18.6 KB · Affichages: 44
  • test.xlsm
    18.6 KB · Affichages: 51
  • test.xlsm
    18.6 KB · Affichages: 58

youky(BJ)

XLDnaute Barbatruc
Re : Aide pour index(Match()) en vba

Bonjour lemarcheurfou,
Macro avec Match
Code:
Sub Test()
With Sheet1
basD = .Range("D" & Rows.Count).End(xlUp).Row
basI = .Range("I" & Rows.Count).End(xlUp).Row
 For lig = 1 To basI
  If .Cells(lig, "I") <> "" Then
   malig = Application.Match(.Cells(lig, "I"), .Range("D1:D" & basD), 0)
    .Cells(lig, "J") = .Cells(malig, "A")
    .Cells(lig, "K") = .Cells(malig, "B")
  End If
 Next
End With
End Sub

Bonne ballade
Bruno
 

Discussions similaires