Pretty much: if column G it's duplicated then concat info on column L and delete the other one so we have no duplicated and kept all the info on column L intact.Example.xlsx
Option Explicit Sub MERGING() Dim lr&, i&, j&, k&, rng, arr(1 To 10000, 1 To 12) Dim dic As Object, key Set dic = CreateObject("Scripting.Dictionary") With Sheets("B4") lr = .Cells(Rows.Count, "G").End(xlUp).Row rng = .Range("A2:L" & lr).Value For i = 1 To UBound(rng) If Not dic.exists(rng(i, 7)) Then dic.Add rng(i, 7), rng(i, 12) Else dic(rng(i, 7)) = dic(rng(i, 7)) & "; " & rng(i, 12) End If Next For Each key In dic.keys k = k + 1 For i = 1 To UBound(rng) If rng(i, 7) = key Then For j = 1 To 11 arr(k, j) = rng(i, j) Next arr(k, 12) = dic(key) Exit For End If Next Next End With With Sheets("After") ' change output sheet name to suit .Range("A2:L10000").ClearContents .Range("A2").Resize(dic.Count, 12).Value = arr End With End Sub
Bookmarks