B boullitt93 XLDnaute Nouveau 14 Octobre 2009 #1 bonsoir, je souhaiterais programmer ce type de formule dans une macro existante : si(ou(A2="JB";A2="JC";A2="JD");recopie le champ A19:G20 en A5 ; sinon rien) En attente de vos idées ! Bonne soirée
bonsoir, je souhaiterais programmer ce type de formule dans une macro existante : si(ou(A2="JB";A2="JC";A2="JD");recopie le champ A19:G20 en A5 ; sinon rien) En attente de vos idées ! Bonne soirée
G Guest Guest 14 Octobre 2009 #2 Re : Macro instruction bonsoir, Sans plus d'explication cela pourrait ressembler à ceci: Code: Sub Test() If InStr(1, "JB;JC;JD", [A2]) > 0 Then Range("A19:G20").Copy Range("A5") Application.CutCopyMode = False End If End Sub A+ Vote positif 0 Vote négatif
Re : Macro instruction bonsoir, Sans plus d'explication cela pourrait ressembler à ceci: Code: Sub Test() If InStr(1, "JB;JC;JD", [A2]) > 0 Then Range("A19:G20").Copy Range("A5") Application.CutCopyMode = False End If End Sub A+
H haonv XLDnaute Occasionnel 14 Octobre 2009 #3 Re : Macro instruction Bonjour a tous Tu peux essayer ceci: If Range("A2") = "JB" Or Range("A2") = "JC" Or Range("A2") = "JD" Then Range("A19:G20").copy Range("A5") End If Amicalement Vote positif 0 Vote négatif
Re : Macro instruction Bonjour a tous Tu peux essayer ceci: If Range("A2") = "JB" Or Range("A2") = "JC" Or Range("A2") = "JD" Then Range("A19:G20").copy Range("A5") End If Amicalement
B boullitt93 XLDnaute Nouveau 15 Octobre 2009 #4 Re : Macro instruction Merci bien ça fonctionne Cdlt BOULLITT Vote positif 0 Vote négatif