1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| Sub commandeMP()
Dim i As Integer
Dim j As Integer
Dim Lignebase As Integer
Dim Colonnebase As Integer
Dim CodeGPAO As Integer
Dim Désignation As Integer
Dim Fournisseur As Integer
Dim Quantité As Integer
Dim Unité As Integer
Dim Délai As Integer
Dim Lignebilan As Integer
Dim Colonnebilan As Integer
Sheets("Analyses MP").Select
Lignebase = 2
Colonnebase = 15
For i = 2 To 700 Step 1
For j = 15 To 15 Step 0
Cells(i, j).Select
If Cells(i, j).Value <> 0 Then
CodeGPAO = Cells(i, j - 14).Value
Désignation = Cells(i, j - 13).Value
Fournisseur = Cells(i, j - 12).Value
Quantité = Cells(i, j).Value
Unité = Cells(i, j + 1).Value
Délai = Cells(i, j + 2).Value
Sheets("Synthèse").Select
Range("B6").Select
Lignebilan = 6
Colonnebilan = 2
Cells(Lignebilan, Colonnebilan) = CodeGPAO
Cells(Lignebilan, Colonnebilan + 1) = Désignation
Cells(Lignebilan, Colonnebilan + 2) = Fournisseur
Cells(Lignebilan, Colonnebilan + 3) = Quantité
Cells(Lignebilan, Colonnebilan + 4) = Unité
Cells(Lignebilan, Colonnebilan + 5) = Délai
ActiveCell.Offset(1, 0).Select
End If
Next i
Next j
End Sub |
Partager