I understand 1,1,2,8 for A.
But why 2,2,4 for B?
![]()
Sub test() Dim i As Long, x Cells(1).CurrentRegion.Offset(1).ClearContents For i = 1 To Cells(1).CurrentRegion.Columns.Count x = [a17].CurrentRegion.Address x = Split(Evaluate("textjoin(char(2),true,transpose(if(" & x & "=""" & _ Split(Cells(1, i))(0) & """,column(" & x & "),"""")))"), Chr(2)) If UBound(x) > -1 Then Cells(2, i).Resize(UBound(x) + 1) = Application.Transpose(x) Next End Sub
Bookmarks