same provisos as before:
Sub blah2()
Dim colm As Range
Set startrng = Range("A1").CurrentRegion
Range("A1").Subtotal GroupBy:=1, Function:=xlCount, TotalList:=Array(3), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
destRow = 0
ColmsToTranferCount = startrng.Columns.Count - 1
For Each are In startrng.Offset(1).Columns(2).SpecialCells(xlCellTypeConstants, 23).Areas
destRow = destRow + 1
Sheets("Sheet2").Cells(destRow, 1).Value = are.Cells(1).Offset(, -1).Value
DestColm = 2
For Each colm In are.Resize(, ColmsToTranferCount).Columns
sss = GetUniques(colm)
Select Case True
Case IsArray(sss)
Sheets("Sheet2").Cells(destRow, DestColm).Resize(, UBound(sss) + 1).Value = sss 'Application.Transpose(colm.Value)
DestColm = DestColm + UBound(sss) + 1
Case IsEmpty(sss)
Case Else
Sheets("Sheet2").Cells(destRow, DestColm).Value = sss
DestColm = DestColm + 1
End Select
Next colm
Next are
Range("A1").RemoveSubtotal
End Sub
Function GetUniques(rng As Range)
If Application.WorksheetFunction.CountBlank(rng) = rng.Cells.Count Then
GetUniques = Empty
Else
If rng.Cells.Count = 1 Then
GetUniques = rng.Value
Else
Z = rng.Value
Set myDictionary = CreateObject("Scripting.Dictionary")
myDictionary.CompareMode = vbTextCompare 'case insensitive
For Each itm In Z
If Not IsEmpty(itm) Then If Not myDictionary.Exists(CStr(itm)) Then myDictionary.Add CStr(itm), itm
Next itm
GetUniques = myDictionary.Items
End If
End If
End Function