Dans un fonction :
Private Sub Workbook_Open()
Dim i As Integer ' Indice de selection de ligne
Dim j As Integer ' Nombre de ligne à passer
Dim MyLen As Integer ' Longeur de i pour l'incrément de cellule
Dim Cell1, Cell2, Cell3 As String ' Cellule A B C avec l'indice i
i = 1
j = 20
For i = 1 To j ' De la cellule 1 à la cellule max
If i > 9 Then ' Si i > 9 fonction Right sur 2 caractères
MyLen = 2
Else
MyLen = 1 ' Si i < 9 fonction Right sur 1 caractères
End If
Cell1 = "B" & Right(Str(i), MyLen) ' Concaténation Right pour éviter un blanc entre B et i
Cell2 = "C" & Right(Str(i), MyLen) ' Concaténation Right pour éviter un blanc entre C et i
Cell3 = "D" & Right(Str(i), MyLen) ' Concaténation Right pour éviter un blanc entre D et i
Range(Cell1).Select
' Si B n'est pas vide ou > à 0
If Range(Cell1).Value <> "" And Range(Cell1).Value <> 0 Then
' on fait le calcule D=B*C
Range(Cell3).Value = Range(Cell1).Value * Range(Cell2).Value
End If
Next
End Sub
Voilà ! j'espère que ça t'ira !
@+