我有很多列的数据行,例如:
Date=Team2:Date Date Exercise 1 Reps Weight Team Exercise 2 Reps Weight
9/18/2019 9/18/2019 chinup 10 2 2 situp 10 3
我想按如下所示将数据拉到另一张纸中:
Date=Team2:Date Exercises Reps Weight Team
9/18/2019 chinup 10 2 2
9/18/2019 situp 10 3 2
我尝试了查询和转置的组合,但是没有得到想要的结果。这有可能吗?
答案 0 :(得分:0)
如果AddTraining工作表类似于:
然后您可以使用:
=ARRAYFORMULA(QUERY({
AddTraining!A2:A, AddTraining!C2:E;
AddTraining!A2:A, AddTraining!G2:I;
AddTraining!A2:A, AddTraining!J2:L;
AddTraining!A2:A, AddTraining!N2:P;
AddTraining!A2:A, AddTraining!R2:T;
AddTraining!A2:A, AddTraining!U2:W;
AddTraining!A2:A, AddTraining!X2:Z;
AddTraining!A2:A, AddTraining!AA2:AC},
"where Col2 is not null
order by Col1", 0))