Reputation: 47
I have a sales SpreadSheet that is divided in columns per month and I need to turn the months into columns with the sales values.
I've made an example sheet
I have the data in this model:
and I need to turn it into this model:
There is a way to do this with formulas or script?
I've tried to use Pivot Table and Transpose but didn't work as expected.
Upvotes: 1
Views: 182
Reputation: 1
try:
=ARRAYFORMULA({"PRODUCT"\ "MONTHS"\ "SALES";
SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(
IF(B2:G9<>""; "♠"&A2:A9&"♦"&B1:G1&"♦"&B2:G9; );;999^99));;999^99); "♠")); "♦")})
Upvotes: 2