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
| Sub Retraitement_données()
'18th March 2009
Cells(5, 7) = Cells(5, 1).Value
Cells(5, 8) = Cells(5, 2).Value
Cells(5, 9) = Cells(5, 3).Value
Cells(5, 10) = Cells(5, 4).Value
x = 0
s = 0
v = 0
j = 0
For i = 1 To 43
If Cells(5 + i, 1) - Cells(4 + i, 1) = x Then
Cells(5 + i - s, 7 + v) = Cells(5 + i, 1).Value
Cells(5 + i - s, 8 + v) = Cells(5 + i, 2).Value
Cells(5 + i - s, 9 + v) = Cells(5 + i, 3).Value
Cells(5 + i - s, 10 + v) = Cells(5 + i, 4).Value
ElseIf Cells(5 + i, 1) - Cells(4 + i, 1) <> x Then
j = j + 4
Cells(5, 7 + j) = Cells(5 + i, 1).Value
Cells(5, 8 + j) = Cells(5 + i, 2).Value
Cells(5, 9 + j) = Cells(5 + i, 3).Value
Cells(5, 10 + j) = Cells(5 + i, 4).Value
v = j
s = i
End If
Next i
End Sub |
Partager