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 116
| Sub Centralisation()
Dim numCell As Double
Dim numCell2 As Double
numCell2 = 3
numCell = 4
Do While Cells(numCell, 5) <> ""
Select Case Cells(numCell, 5)
Case "A"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 1).Select
ActiveSheet.Paste
Case "B"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 2).Select
ActiveSheet.Paste
Case "C"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, numCell2).Select
ActiveSheet.Paste
Case "D"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 4).Select
ActiveSheet.Paste
Case "E"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 5).Select
ActiveSheet.Paste
Case "F"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 6).Select
ActiveSheet.Paste
Case "G"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 7).Select
ActiveSheet.Paste
Case "H"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 8).Select
ActiveSheet.Paste
Case "I"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 9).Select
ActiveSheet.Paste
Case "J"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 10).Select
ActiveSheet.Paste
Case "K"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 11).Select
ActiveSheet.Paste
Case "L"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 12).Select
ActiveSheet.Paste
Case "M"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 13).Select
ActiveSheet.Paste
Case "N"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 14).Select
ActiveSheet.Paste
Case "O"
numCell = numCell + 1
Cells(numCell, 4).Select
Selection.Copy
Sheets("Centralisation").Select
Cells(numCell2, 15).Select
ActiveSheet.Paste
End Select
Loop
End Sub |
Partager