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
| Sub transformation_planning_sup_si()
Sheets("PLANNING").Activate
DernLigne = Range("C" & Rows.Count).End(xlUp).Row
For i = 18 To DernLigne
Sheets("PLANNING").Select
If Cells(i, 3) <> "" And Cells(i, 8) <> "PLANNING GENERAL" And Cells(i, 8) <> "à définir" Then
For j = 15 To 365
Sheets("PLANNING").Select
If Cells(i, j) <> "" Then
Range(Cells(i, 3), Cells(i, 14)).Select
Selection.Copy
Sheets("PBd").Select
For k = 2 To 60000
If Cells(k, 1) = "" Then
Cells(k, 1).Select
ActiveSheet.Paste
Sheets("PLANNING").Select
Cells(17, j).Select
ActiveCell.Copy
Sheets("PBd").Select
Cells(k, 13).Select
ActiveSheet.Paste
k = 60000
End If
Next k
End If
Next j
End If
j = 17
Next i
Sheets("PBD").Activate
Dernligne2 = Range("C" & Rows.Count).End(xlUp).Row
For i = 2 To Dernligne2
Sheets("PBd").Select
For j = 7 To 121
If Cells(i, 13).Value = Sheets("jf").Cells(j, 3).Value Then
Rows(i).Delete
i = i - 1
End If
Next j
Next i
End Sub |
Partager