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

Réponses
10
Affichages
521
Réponses
17
Affichages
768

Statistiques des forums

Discussions
312 215
Messages
2 086 316
Membres
103 176
dernier inscrit
jean.yvesjean.yves