It would have been nice if you had described what the code should do under what conditions...
Code:Sub M_snb() sn = Sheets("Current").Cells(1).CurrentRegion.Offset(, 5).Resize(, 15) sp = Sheets("Previous").Cells(1).CurrentRegion.Offset(, 5).Resize(, 15) With CreateObject("scripting.dictionary") For j = 1 To UBound(sn) .Item(sn(j, 1)) = Application.Index(sn, j, 0) Next For j = 1 To UBound(sp) st = .Item(sp(j, 1)) st(13) = sp(j, 5) st(14) = sp(j, 6) st(15) = sp(j, 7) .Item(sp(j, 1)) = Application.Index(st) Next Sheets("CURRENT").Cells(1).CurrentRegion.Offset(, 5).Resize(, 15) = Application.Index(.items, 0, 0) End With End Sub




Reply With Quote
Bookmarks