I have this data set:
and I want to transpose it where the Date is in a Column then A is in the next Column and B on the next
I used this formula
= Transpose(Index($B$1:$D$11,match(F$1,$A$1:$A$11,0)))
but the outcome gives only the first table
What can I do to make my data look like this?
(so that whenever I would add a new week's data, my table would also change).
Best Answer
This might be possible with some ingenious queries, but to me it seemed easier to write a script (entered via Tools > Script editor). It updates the sheet as new data is entered. Some explanation:
1, 6
near the end of the script.newColumns
, is inferred by going through column A until there is an empty cell in it. In your case, A4 is the first empty cell, which signifies you have 3 rows of data, so there will be 3 columns.The logic is pretty straightforward: grabbing and pushing data around.
If you want to put the output on another sheet, replace the command
with
(You may also want to change 1, 6 to something else like 1, 1 now that the output has its own sheet.)