Bonjour,
Voila mon code, enfaite j'ai un soucis d'incrémentation je voudrais qu'il vérifie des cellules en +27 mais cela ne fait rien ...
Il devrait vérifier la celulle (B,9) (B,36) (B,63) etc... mais nan ! la seul chose qui réalise bien c'est quand la celulle (B,9) donc la premiere confirm la condition ca passe puis (B,36) il veut plus vérifié .. ca viendrait d'un problème d'incrémentation ... ?
Merci de me lire
Voila mon code, enfaite j'ai un soucis d'incrémentation je voudrais qu'il vérifie des cellules en +27 mais cela ne fait rien ...
Code:
Sub COPY()
Dim Variable1 As String
Dim Variable2 As String
Dim Variable3 As String
Dim Variable4 As String
Dim Variable5 As String
Dim Variable6 As String
Dim Variable7 As String
Dim i As Integer
Dim j As Integer
For i = 9 To 256
If Cells(i, 2) = "753220 - PARIS KELLER ACP" Then
For j = i + 1 To 256
If Cells(i + 1, j) = "Janvier" Then
ActiveWorkbook.Sheets("Détail ACP").Select
Variable1 = ActiveSheet.Cells(12, j).Value
Variable2 = ActiveSheet.Cells(17, j).Value
Variable3 = ActiveSheet.Cells(19, j).Value
Variable4 = ActiveSheet.Cells(21, j).Value
Variable5 = ActiveSheet.Cells(22, j).Value
Variable6 = ActiveSheet.Cells(26, j).Value
Variable7 = ActiveSheet.Cells(27, j).Value
Workbooks.Open ActiveWorkbook.Path & "\TBM ACP.xls"
ActiveWorkbook.Sheets("Paris Keller").Cells(10, 7).Value = Variable1
ActiveWorkbook.Sheets("Paris Keller").Cells(11, 7).Value = Variable2
ActiveWorkbook.Sheets("Paris Keller").Cells(12, 7).Value = Variable3
ActiveWorkbook.Sheets("Paris Keller").Cells(14, 7).Value = Variable4
ActiveWorkbook.Sheets("Paris Keller").Cells(15, 7).Value = Variable5
ActiveWorkbook.Sheets("Paris Keller").Cells(16, 7).Value = Variable6
ActiveWorkbook.Sheets("Paris Keller").Cells(18, 7).Value = Variable7
ActiveWorkbook.Sheets("Paris Keller").Select
j = j + 1
End If
Next
Exit Sub
i = i + 27
End If
Next
End Sub
Il devrait vérifier la celulle (B,9) (B,36) (B,63) etc... mais nan ! la seul chose qui réalise bien c'est quand la celulle (B,9) donc la premiere confirm la condition ca passe puis (B,36) il veut plus vérifié .. ca viendrait d'un problème d'incrémentation ... ?
Merci de me lire