Explanation - First table is the original table, paste unique names ( Gary, Ben) as transpose in the next rows , insert the index match formula in cell below and drag down,write similar formula in next column and drag down.
use this formula INDEX($C:$C,MATCH(F$2,$A:$A,0)+ROW(1:1)-1,0) or look for offset formula.
Column C contains gold,silver detail and column a contains names. F2 is gary pasted as transpose below
Gary Ben [ transpose of all unique names]
formula formula
formula formula
Then copy paste table e:f as transpose values to get the desired layout
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…