I saw this solution from another user and it was answered (by Opal). I am trying to modify the results a bit it but am getting stuck with blank values. I have this table of raw data (as an example)
idn | id name | d1 | d2 | d3 ...
id1 | /name1/ | 23 | 13 | 56
id2 | /name2/ | 67 | 45 |
id3 | /name3/ | 43 |
id4 | /name4/ | 78 | 34 | 45
.
.
I want to transpose this list to the following form for uploading to a database, the results should look like:
id1 | /name1/ | date1 | 23
id1 | /name1/ | date2 | 13
id1 | /name1/ | date3 | 56
id2 | /name2/ | date1 | 67
id2 | /name2/ | date2 | 45
id3 | /name3/ | date1 | 43
id4 | /name4/ | date1 | 78
id4 | /name4/ | date2 | 34
id4 | /name4/ | date3 | 45
.
.
How can I do this - my current solution is as follows but does not work with blank spaces. I saw Opal solution which worked with blank spaces, but could not figure out how to create the date column (column 3 in the results)
ArrayFormula({transpose(split(query(rept(A2:A&" ", COUNTA(C1:1)),,50000)," ")),transpose(split(query(rept(B2:B&" ", COUNTA(C1:1)),,50000)," ")),TRANSPOSE(SPLIT(JOIN(" ", ARRAYFORMULA(REPT(join(" ",(query(C1:1)))&" ", COUNTA(A2:A)))), " ")),transpose(split(join(" ",query(transpose(C2:M),,50000)), " "))})
Any suggestions? It is a large data set, and I am hitting the limits on all of the string functions, rept limit of 32,000 and the join limit of 50,000 Thanks.