Almanzor
Nouveau membre
Bonjour tout le monde,
Je souhaite utiliser une variable dans FormulaR1C1 et je n'obtiens que du stress.
Je joins partie du code ci-après.
La variable : Mvt, est dûment déclarée.
Si quelqu'un veut bien regarder, je lui suis reconnaissant.
Merci.
Sub Périodicité()
'
Dim Mvt As Integer
Dim Col As Integer
For Col = 5 To 20
Cells(52, Col).Select
Mvt = 0
Pér = ActiveCell.Value
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "=(-1)*PMT(R[-37]C[-Mvt]/R[-1]C,R[-39]C[-Mvt]*R[-1]C,R[-41]C[-Mvt])"
Mvt = Mvt + 1
..........etc
Je souhaite utiliser une variable dans FormulaR1C1 et je n'obtiens que du stress.
Je joins partie du code ci-après.
La variable : Mvt, est dûment déclarée.
Si quelqu'un veut bien regarder, je lui suis reconnaissant.
Merci.
Sub Périodicité()
'
Dim Mvt As Integer
Dim Col As Integer
For Col = 5 To 20
Cells(52, Col).Select
Mvt = 0
Pér = ActiveCell.Value
ActiveCell.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "=(-1)*PMT(R[-37]C[-Mvt]/R[-1]C,R[-39]C[-Mvt]*R[-1]C,R[-41]C[-Mvt])"
Mvt = Mvt + 1
..........etc