Weird, worked for me.
but I have to admit I used lazy coding.
Adjust as follows:
Sub excelforum()
Dim unique$, rw As Range, col As Range
Sheet2.Cells.ClearContents
For Each rw In Sheet1.Range("A1:A" & Sheet1.Cells(Rows.Count, 1).End(xlUp).Row)
For Each col In Sheet1.Range(Cells(rw.Row, 2), Sheet1.Cells(rw.Row, Sheet1.Cells(rw.Row, Columns.Count).End(xlToLeft).Column))
If Not col = vbNullString And InStr(unique, col) = 0 Then
unique = unique & col & ","
Sheet2.Cells(rw.Row, Sheet2.Cells(rw.Row, Columns.Count).End(xlToLeft).Column).Offset(0, 1) = col
End If
Next col
unique = vbnulstring
Next rw
End Sub
Bookmarks