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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
| Sub Planning()
Dim Lig As Long
Dim Col As Long
Dim Lig2 As Long
Dim Col2 As Long
Dim Stag As String
Dim V As String
Dim Ref As Date
Dim Ref2 As Date
Dim Ref3 As Date
Dim C As Long
Dim I As Long
Dim Cod As String
Dim Lig3 As Long
Lig = 733
Lig2 = 2
Col2 = 32
Application.ScreenUpdating = False
Range("G733", "M1050").ClearContents
Rows("733:1664").EntireRow.AutoFit
Sheets("Base").Activate
While Cells(Lig2, 1) <> ""
If Trim(Cells(Lig2, 17)) <> "" Then GoTo Boucle
If Trim(Cells(Lig2, Col2)) = "FAULSO" Then
GoTo Boucle
End If
If Trim(Cells(Lig2, Col2)) = "FURSTDA" Then
GoTo Boucle
End If
If Trim(Cells(Lig2, Col2)) = "HANTZOVI" Then
GoTo Boucle
End If
If Trim(Cells(Lig2, Col2)) = "HONOLDLA" Then
GoTo Boucle
End If
If Trim(Cells(Lig2, Col2)) = "JACQUEMR" Then
GoTo Boucle
End If
If Trim(Cells(Lig2, Col2)) = "MASTIOSO" Then
GoTo Boucle
End If
If Trim(Cells(Lig2, Col2)) = "VENANTIS" Then
GoTo Boucle
End If
If Trim(Cells(Lig2, Col2)) = "BURSTMA" Then
Col = 7
End If
If Trim(Cells(Lig2, Col2)) = "ENGELMD" Then
Col = 8
End If
If Trim(Cells(Lig2, Col2)) = "LIDOLFFA" Then
Col = 9
End If
If Trim(Cells(Lig2, Col2)) = "TEIXEIPA" Then
Col = 10
End If
If Trim(Cells(Lig2, Col2)) = "VETTERDA" Then
Col = 11
End If
Stag = Cells(Lig2, 6)
Cod = Cells(Lig2, 5)
Ref = Cells(Lig2, 21)
Ref2 = Cells(Lig2, 22)
Sheets("Animation").Activate
Lig3 = 733
Ref3 = Ref
While Cells(Lig3, 3) <= Ref2
If Cells(Lig3, 3) = Ref Then
Do
Cells(Lig3, Col) = Cells(Lig3, Col) & Chr(10) & Cod & "-" & Stag
Ref3 = Date + 1
Lig3 = Lig3 + 1
Loop Until Cells(Lig3, 3) > Ref2
End If
Lig3 = Lig3 + 1
Wend
Boucle:
Sheets("Base").Activate
Lig2 = Lig2 + 1
Wend
Sheets("Animation").Activate
Application.ScreenUpdating = True
End Sub |
Partager