I have something like
1 2 3 a x o x b x x o c o o o
and want to transform it into lines like
1 a x 1 b x 1 c x 2 a o 2 b x 2 c o 3 a x 3 b o 3 c o
by using a formula in the excel document. Playing with $ for assigning values for each row and column does give me proper results. Each time I have to do some manual changes to the formula.
Any hint how to write it the right way?
Suppose that your matrix in the cells A1:D4
in A6 put:
in B6 put:
in C6 put:
Den drag down (copying formulas) A6:C6 up to A14:C14
(I translate my formulas from italian so there could be some glitch)
PS: 3 in the formulas refers to the number of rows (and column) of the example.
I know that it was answer years ago, BUT there is a much easier way to flatten the pivot table. This is also called the unpivot or reverse pivot.