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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
| Sub Macro1()
'
' Macro1 Macro
'
'Private NombreDeLigneDuTableau As Integer
'Private PremiereLigneDuTAbleau As Integer
NombreDeLigneDuTableau = Sheets("VP 2017").Range("BC1").Value
PremiereLigneDuTableau = Sheets("VP 2017").Range("BC2").Value
For i = PremiereLigneDuTableau To PremiereLigneDuTableau + NombreDeLigneDuTableau
If Not IsEmpty(Cells(i, 16)) Then
Cells(i, 56) = 1
End If
If Not IsEmpty(Cells(i, 22)) Then
Cells(i, 57) = 1
End If
If Not IsEmpty(Cells(i, 28)) Then
Cells(i, 58) = 1
End If
If Not IsEmpty(Cells(i, 34)) Then
Cells(i, 59) = 1
End If
If Not IsEmpty(Cells(i, 40)) Then
Cells(i, 60) = 1
End If
If Not IsEmpty(Cells(i, 46)) Then
Cells(i, 61) = 1
End If
If Cells(i, 56) = 1 Then
With Sheets("VP 2017")
.Cells(i, 19) = Application.WorksheetFunction.VLookup(Cells(i, 8), Sheets("VP 2017").Range("BW5:BX7"), 2, False)
End With
Cells(i, 56) = 2
Else
GoTo Li35
End If
If Cells(i, 57) = 1 Then
With Sheets("VP 2017")
.Cells(i, 25) = Application.WorksheetFunction.VLookup(Cells(i, 8), Sheets("VP 2017").Range("BW5:BX7"), 2, False)
End With
Cells(i, 57) = 2
Else
GoTo Li43
End If
If Cells(i, 58) = 1 Then
With Sheets("VP 2017")
.Cells(i, 31) = Application.WorksheetFunction.VLookup(Cells(i, 8), Sheets("VP 2017").Range("BW5:BX7"), 2, False)
End With
Cells(i, 58) = 2
Else
GoTo Li51
End If
If Cells(i, 59) = 1 Then
With Sheets("VP 2017")
.Cells(i, 37) = Application.WorksheetFunction.VLookup(Cells(i, 8), Sheets("VP 2017").Range("BW5:BX7"), 2, False)
End With
Cells(i, 59) = 2
Else
GoTo Li59
End If
If Cells(i, 60) = 1 Then
With Sheets("VP 2017")
.Cells(i, 43) = Application.WorksheetFunction.VLookup(Cells(i, 8), Sheets("VP 2017").Range("BW5:BX7"), 2, False)
End With
Cells(i, 60) = 2
Else
GoTo Li67
End If
If Cells(i, 61) = 1 Then
With Sheets("VP 2017")
.Cells(i, 49) = Application.WorksheetFunction.VLookup(Cells(i, 8), Sheets("VP 2017").Range("BW5:BX7"), 2, False)
End With
Cells(i, 61) = 2
Else
GoTo Li75
End If
Next
End Sub |
Partager