VB excel 2003

Résolu
leure007 Messages postés 8 Date d'inscription   Statut Membre -  
Polux31 Messages postés 7219 Statut Membre -
Bonjour,

Je désire répéter l'opération suivante (loop?) jusqu'à ce que le Range ("I4") atteigne ("I200") et l'ActiveCell.FormulaR1C1 = "=R4C4" atteigne ActiveCell.FormulaR1C1 = "=R200C4"

Range("I4").Select
ActiveCell.FormulaR1C1 = "=R4C4"
Range("I5").Select
ActiveCell.FormulaR1C1 = "=R5C4"
Range("I6").Select
ActiveCell.FormulaR1C1 = "=R6C4"
Range("I7").Select
ActiveCell.FormulaR1C1 = "=R7C4"

Si quelqu'un pouvait m'aider...
Un grand merci d'avance.

Have a nice day
Configuration: Windows XP
Firefox 3.0.13

2 réponses

  1. Polux31 Messages postés 7219 Statut Membre 1 204
     
    Bonjour,

    Peut être comme ça :

    Dim i As Integer
    
    For i = 4 to 200
       Range("I" & i).Select 
       ActiveCell.FormulaR1C1 = "=R" & i & "C4" 
    Next i


    Ou bien :
    Dim i As Integer
    
       i = 4
       While i < 200
          Range("I" & i).Select 
          ActiveCell.FormulaR1C1 = "=R" & i & "C4"
       i = i + 1
       Wend


    ;o)
    0
    1. leure007 Messages postés 8 Date d'inscription   Statut Membre
       
      Un grand merci Polux. Ca marche super.
      Que la force soit avec toi.
      0
  2. Polux31 Messages postés 7219 Statut Membre 1 204
     
    De rien, ^^

    Merci de mettre le topic en résolu.

    Bonne continuation et bon courage.

    ;o)
    0