philippe87420
XLDnaute Nouveau
bonjour
pour alléger mon fichier je souhaiterai mettre fonction en VBA
donc j'ai essayé d'écrire ça le probléme ça me copie ce que j'ai écrie
Code: Tout sélectionner
Sub Macro1()
'
Dim ligne As String
ligne2 = 5
Do While Cells(ligne2, 21).Value <> ""
Cells(ligne2, 22).Value = "Application.WorksheetFunction.COUNTIFS(R21C4:R9978C4,""=cuts"",R21C19:R9978C19,""=""&RC20,R21C18:R9978C18,""<>oui"")"
Cells(ligne2, 23).Value = "Application.WorksheetFunction.SumIfs(R21C14:R9978C14,R21C4:R9978C4,""=cuts"",R21C19:R9978C19,""=""&RC20,R21C18:R9978C18,""<>oui"")"
ligne2 = ligne2 + 1
Loop
End Sub
je joins le fichier et merci d'avance pour votre aide
philippe
pour alléger mon fichier je souhaiterai mettre fonction en VBA
donc j'ai essayé d'écrire ça le probléme ça me copie ce que j'ai écrie
Code: Tout sélectionner
Sub Macro1()
'
Dim ligne As String
ligne2 = 5
Do While Cells(ligne2, 21).Value <> ""
Cells(ligne2, 22).Value = "Application.WorksheetFunction.COUNTIFS(R21C4:R9978C4,""=cuts"",R21C19:R9978C19,""=""&RC20,R21C18:R9978C18,""<>oui"")"
Cells(ligne2, 23).Value = "Application.WorksheetFunction.SumIfs(R21C14:R9978C14,R21C4:R9978C4,""=cuts"",R21C19:R9978C19,""=""&RC20,R21C18:R9978C18,""<>oui"")"
ligne2 = ligne2 + 1
Loop
End Sub
je joins le fichier et merci d'avance pour votre aide
philippe