Excel Row-to-column Transposition after Two-level Grouping

Problem description

Below is Excel data, where an item with same Name could have several colors.


We want to rearrange data in the file in the following layout, which is putting each Type in one row and after it each Name and the corresponding colors are listed.



Use the SPL XLL plug-in

Write the formular in a blank cell:


As shown:



Group data by Type and then divide each group by Name.

Loop through each group to get the Type value, join it with the sequences of Name and Color(s) obtained from the subgroups, and concatenate all members of the large sequence using conj fuction.

Q & A Collection