The only requirement is that there be a one to one relationship between source and target cells.

Note that this function creates a dynamic link between the source and target.

Any change in to data in the source table will be reflected in the target table.

Excel formula: Transpose table without zeros

go for the source data, copy, then use Paste Special > Transpose.

Excel TRANSPOSE function