Umm, I forgot why this snippet works...it finds unique values within a selection. I paste only the portion here to make a point. It transposes data in cell Cells(j, 122), Cells(j, 122)
Dim V As Variant, Data As Variant
Data = Selection
With CreateObject("Scripting.Dictionary")
For Each V In Data
If Len(V) Then .Item(V) = 1
Next
Range(Cells(j, 122), Cells(j, 122)).Resize(.Count) = Application.Transpose(.Keys)
End With
...but I don't want it transposed. it's coming vertically, I want it coming horizontally. Maybe I need only change it a bit?
Dim V As Variant, Data As Variant
Data = Selection
With CreateObject("Scripting.Dictionary")
For Each V In Data
If Len(V) Then .Item(V) = 1
Next
Range(Cells(j, 122), Cells(j, 122)).Resize(.Count) = Application.Transpose(.Keys)
End With
...but I don't want it transposed. it's coming vertically, I want it coming horizontally. Maybe I need only change it a bit?