1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| For Each k In Array(42, 43, 44, 45, 49, 60, 61, 62, 67, 68, 69, 70, 71, 75, 76, 77, 78, 79, 84, 85, 86, 87, 89, 96, 97, 98, 99, 107, 108, 109, 110, 117, 118, 119, 120, 129, 130, 131, 132)
For i = 6 To LastRow1
For j = 6 To Lastrow2
MsgBox Worksheets("XSCL").Cells(i, 2).Value '=600238
MsgBox Worksheets("Previous_Table").Cells(j, 2).Value '=600238
MsgBox Worksheets("XSCL").Cells(i, 8).Value '=58
MsgBox Worksheets("Previous_Table").Cells(j, 8).Value '=58
If (Worksheets("XSCL").Cells(i, 2).Value = Worksheets("Previous_Table").Cells(j, 2).Value _
And Worksheets("XSCL").Cells(i, 8).Value = Worksheets("Previous_Table").Cells(j, 8).Value) Then
Worksheets("XSCL").Cells(i, k).Value = Worksheets("Previous_Table").Cells(j, k).Value
Exit For
End If
Next j
Next i
Next k
End Sub |
Partager