Index Match pour recherche multi criteres en VBA

Bonjour

Je cherche à effectuer une macro permettant de remplacer la formule Excel suivante

=INDEX(HISTORY_LIVRAISONS!H:H;EQUIV(1;(HISTORY_LIVRAISONS!W:W="1st CONFIRMATION")*(HISTORY_LIVRAISONS!E:E=LIVRAISONS!I2);0))

Le code VBA que j'ai essayé est le suivant:

Dim Date_1er_confirmation As Variant

Dim commande As String

Date_1er_confirmation = Application.Index(Worksheets("HISTORY_LIVRAISONS").Range("H:H"), Application.Match(commande, Worksheets("HISTORY_LIVRAISONS").Range("E:E"), 0), Application.Match("1st confirmation", Worksheets("HISTORY_LIVRAISONS").Range("W:W"), 0))

J'ai un message d'erreur 2042. Pouvez-vous m'aider à corriger l'erreur?

Merci de votre aide

Bonjour AGA, le forum,

Un essai.... ??

Date_1er_confirmation.formula="=INDEX(HISTORY_LIVRAISONS!H:H,MATCH(1,(HISTORY_LIVRAISONS!W:W=""1st CONFIRMATION"")*(HISTORY_LIVRAISONS!E:E=LIVRAISONS!I2),0))"

Cordialement,

Malheureusement cela ne fonctionne pas.

Erreur execution 424

Re,

Que vaut commande dans ta formule ?

Date_1er_confirmation = Application.Index(Worksheets("HISTORY_LIVRAISONS").Range("H:H"), Application.Match(commande, Worksheets("HISTORY_LIVRAISONS").Range("E:E"), 0), Application.Match("1st confirmation", Worksheets("HISTORY_LIVRAISONS").Range("W:W"), 0))

Tu ne peux pas joindre un fichier représentatif (sans données confidentielles) ?

Cordialement,

Commande correspond à un texte (numerique ou alpha numerique).

Ci-joint l'exemple d'un fichier.

Merci beaucoup de votre aide.

Re,

Un essai....

Cordialement,

Rechercher des sujets similaires à "index match recherche multi criteres vba"