Re : FormulaR1C1, erreur 1004
bonjour Wilfried,le forum
2 manières de l'écrire
With Sheets("Fichier")
.Range("I" & Index).FormulaLocal = "=SI(H" & Index & ">0;H" & Index & "-F" & Index & ";0)"
.Range("J" & Index).FormulaLocal = "=SI(G" & Index & ">0;G" & Index & "-F" & Index & ";0)"
.Range("K" & Index).FormulaLocal = "=SI(H" & Index & ">0;I" & Index & "-J" & Index & ";0)"
End With
'ou
With Sheets("Fichier")
.Range("I" & Index).Formula = "=If(H" & Index & ">0,H" & Index & "-F" & Index & ",0)"
.Range("J" & Index).Formula = "=If(G" & Index & ">0,G" & Index & "-F" & Index & ",0)"
.Range("K" & Index).Formula = "=If(H" & Index & ">0,I" & Index & "-J" & Index & ",0)"
End With
à bientôt