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
|
Sub Clean_Tiering()
Dim i, j, o, p As Long, n, k, m As Long
n = Range("a1").End(xlDown).Row
k = Range("C1").End(xlDown).Row
m = Range("E1").End(xlDown).Row
For i = n To 3 Step -1
For j = k To 3 Step -1
For o = m To 3 Step -1
For p = 2 To 54
If Cells(i, "A") = Cells(j, "D") Then
If Cells(j, "D") = Cells(o, "G") Then
Cells(i, "A").Copy
Cells(p, "J").Paste
Cells(i, "B").Copy
Cells(p, "K").Paste
Cells(j, "E").Copy
Cells(p, "L").Paste
Cells(o, "H").Copy
Cells(p, "M").Paste
Next p
Else: Next o
End If
Else: Next j
End If
Next i
End Sub |
Partager