Hi
OK, try this one.
Sub bbb()
Dim OutSH As Worksheet
Set nodupes = CreateObject("Scripting.dictionary")
Set OutSH = Sheets("Sheet2")
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
holder = ""
For j = 1 To 14
holder = holder & Cells(i, j) & ","
Next j
holder = Left(holder, Len(holder) - 1)
If Not nodupes.exists(holder) Then
nodupes.Add Key:=holder, Item:=""
End If
For j = 15 To Cells(i, Columns.Count).End(xlToLeft).Column
nodupes(holder) = nodupes(holder) & Cells(i, j) & ","
Next j
Next i
For Each ce In nodupes.keys
outrow = OutSH.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
'For i = 1 To 14
' OutSH.Cells(outrow, i).Value = Mid(ce, i, 1)
'Next i
arr = Split(ce, ",")
For i = LBound(arr) To UBound(arr)
OutSH.Cells(outrow, i + 1).Value = arr(i)
Next i
arr = Split(nodupes(ce), ",")
'For j = 1 To Len(nodupes(ce))
' OutSH.Cells(outrow, Columns.Count).End(xlToLeft).Offset(0, 1).Value = Mid(nodupes(ce), j, 1)
'Next j
For j = LBound(arr) To UBound(arr)
OutSH.Cells(outrow, Columns.Count).End(xlToLeft).Offset(0, 1).Value = arr(j)
Next j
Next ce
End Sub
rylo
Bookmarks