Comment incrémenter la formule VBA sur une plage dynamique ?

Résolu/Fermé
Gedeon - 8 févr. 2022 à 15:03
 Gedeon - 8 févr. 2022 à 16:18
Bonjour,



Configuration: Windows / Chrome 98.0.4758.82

Quelqu'un peut-il m'aider à corriger ce code ? J'ai un message d'erreur
Range("F2").Select
ActiveCell.Formula2R1C1 = _
"=IFERROR(INDEX(C[6]:C[12],MATCH(1,(C[8]=RC[-3])*(C[9]=RC[-2]),0),5),"""")"
Selection.AutoFill Destination:=Range("F2:F" & Range("A" & Rows.Count).End(xlUp).Row).Range(Selection, Selection.End(xlDown)).Select
A voir également:

1 réponse

M-12 Messages postés 1332 Date d'inscription lundi 22 septembre 2008 Statut Membre Dernière intervention 18 février 2025 285
8 févr. 2022 à 15:21
Bonjour,
Teste ceci
Dim f$
f = "=IFERROR(INDEX(C[6]:C[12],MATCH(1,(C[8]=RC[-3])*(C[9]=RC[-2]),0),5),"""")"
Range("F2").Formula = f
Range("F2").AutoFill Destination:=Range("F2:F" & Range("A" & Rows.Count).End(xlUp).Row), Type:=xlFillDefault
0
Merci beaucoup M-12

ça marche correctement.
0

Discussions similaires