Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 重新组织Google驱动器表中的数据_Excel_Google Sheets_Google Drive Api - Fatal编程技术网

Excel 重新组织Google驱动器表中的数据

Excel 重新组织Google驱动器表中的数据,excel,google-sheets,google-drive-api,Excel,Google Sheets,Google Drive Api,我有如下数据: +------+------+------+ | Date | Name | Cost | +------+------+------+ | 1/16 | A | 30 | | 2/16 | B | 20 | | 2/16 | A | 10 | | 4/16 | C | 11 | | 4/16 | C | 15 | | 5/16 | B | 6 | +------+------+------+ +------+---

我有如下数据:

+------+------+------+
| Date | Name | Cost |
+------+------+------+
| 1/16 | A    |   30 |
| 2/16 | B    |   20 |
| 2/16 | A    |   10 |
| 4/16 | C    |   11 |
| 4/16 | C    |   15 |
| 5/16 | B    |    6 |
+------+------+------+
+------+----+----+----+
| Date | A  | B  | C  |
+------+----+----+----+
| 1/16 | 30 |    |    |
| 2/16 |    | 20 |    |
| 2/16 | 10 |    |    |
| 4/16 |    |    | 11 |
| 4/16 |    |    | 15 |
| 5/16 |    |  6 |    |
+------+----+----+----+
我想把它改成这样:

+------+------+------+
| Date | Name | Cost |
+------+------+------+
| 1/16 | A    |   30 |
| 2/16 | B    |   20 |
| 2/16 | A    |   10 |
| 4/16 | C    |   11 |
| 4/16 | C    |   15 |
| 5/16 | B    |    6 |
+------+------+------+
+------+----+----+----+
| Date | A  | B  | C  |
+------+----+----+----+
| 1/16 | 30 |    |    |
| 2/16 |    | 20 |    |
| 2/16 | 10 |    |    |
| 4/16 |    |    | 11 |
| 4/16 |    |    | 15 |
| 5/16 |    |  6 |    |
+------+----+----+----+
我可以通过如下方式复制垂直日期列:
=ArrayFormula(工作表!A2:A7)

我一直在用这个:
=TRANSPOSE(Worksheet!C2:C7)
在顶部处理名称,但这不起作用,因为它重复了名称

此外,我不知道如何获得显示日期和名称相交位置的成本

在Google Drive电子表格中实现这一点是否可能/明智


如果Google Sheets/Spreadsheets不是该工作的合适工具,那是什么?

您可以使用该功能复制表格,但必须先稍微处理一下数据:

=ArrayFormula(查询(如果({1,0,0},A2:A+行(A2:A)/1000000000,A2:C),“选择Col1,求和(Col3),其中Col2!=''按Col1透视分组Col2标签Col1'日期'”,0))


您还需要对输出中的第一列应用日期格式。

您可以使用数据透视表:

并使用以下字段作为字段:

当然,您现在可以根据需要复制零件(从而忽略总计),然后粘贴到另一张图纸或其他东西中,或者更改设置以删除总计


哦,哎呀,我刚刚注意到这不完全是您想要的,因为日期正在分组。。。但如果那很好,那我很高兴。