Hi Ruslan,
one approach to transposing with grouping is concatenating group cells into one, then transposing, then splitting them back.
See the example below.
group-pivot.morph (6.0 KB)
Book1.xlsx (11.3 KB)
On a side note, I’m curious how do you deal with identical repeating column names (Item/Amount)? It’s a very rare case, because almost all systems/applications require column names to be different. How do the end users understand what Item/Amount is what?