Column A
of my Google Spreadsheet contains dates, columns B
to G
contain numeric values, line 1 contains the header names. Due to automatic updates the line count varies, but the column count is static.
Is there a way to change the format of my tabel to:
I want every pair of A + (B to G)
in a new table below the each other. In the new table column A
should contain the dates, B
the header name of the source table column, C
and D
empty and the values of the source table column in column E
.
The new table should update automatically after the source table gets updated. Since the line count varies with every update, I unfortunately have no clue and any help is much appreciated.
SOLUTION:
Thank you very much for your help, highly appreciated. I made one change to marikamitsos solution to work with any number of rows in the source table:
={ArrayFormula(SPLIT(INDIRECT("SourceData!A2:A"&$K$2)&"@"&SourceData!$B$1&"@@@"&INDIRECT("SourceData!B2:B"&$K$2);"@";1;0)); ArrayFormula(SPLIT(INDIRECT("SourceData!A2:A"&$K$2)&"@"&SourceData!$C$1&"@@@"&INDIRECT("SourceData!C2:C"&$K$2);"@";1;0)); ArrayFormula(SPLIT(INDIRECT("SourceData!A2:A"&$K$2)&"@"&SourceData!$D$1&"@@@"&INDIRECT("SourceData!D2:D"&$K$2);"@";1;0)); ArrayFormula(SPLIT(INDIRECT("SourceData!A2:A"&$K$2)&"@"&SourceData!$E$1&"@@@"&INDIRECT("SourceData!E2:E"&$K$2);"@";1;0)); ArrayFormula(SPLIT(INDIRECT("SourceData!A2:A"&$K$2)&"@"&SourceData!$F$1&"@@@"&INDIRECT("SourceData!F2:F"&$K$2);"@";1;0)); ArrayFormula(SPLIT(INDIRECT("SourceData!A2:A"&$K$2)&"@"&SourceData!$G$1&"@@@"&INDIRECT("SourceData!F2:G"&$K$2);"@";1;0)) }
In $K$2 i put:
=ROWS(FILTER(SourceData!A:A; NOT(ISBLANK(SourceData!A:A)))