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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.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
Google sheets 在其他单元格的公式文本中使用_Google Sheets - Fatal编程技术网

Google sheets 在其他单元格的公式文本中使用

Google sheets 在其他单元格的公式文本中使用,google-sheets,Google Sheets,也许这里有人能帮我。A1包含应在B2中使用的字符串。这就是整个公式: =sum(filter('foobar'!$B$4:$B;Month('foobar'!$A$4:$A)=(D1))) 这应该是A1 'foobar'!$B$4:$B;Month('foobar'!$A$4:$A) 这应该在B2中 =sum(filter( ? =(D1))) 问号的位置是什么?我尝试了几种选择,如&,concentate,indirect。不幸的是,不可能。不能使用Sheets电子表格公式计算这样的字符

也许这里有人能帮我。A1包含应在B2中使用的字符串。这就是整个公式:

=sum(filter('foobar'!$B$4:$B;Month('foobar'!$A$4:$A)=(D1)))
这应该是A1

'foobar'!$B$4:$B;Month('foobar'!$A$4:$A)
这应该在B2中

=sum(filter( ? =(D1)))

问号的位置是什么?我尝试了几种选择,如&,concentate,indirect。

不幸的是,不可能。不能使用Sheets电子表格公式计算这样的字符串。最好是使用间接引用,但该函数只支持单元格/范围引用,不支持其他引用。因此:

A1:  'foobar'!$B$4:$B
A2:  'foobar'!$A$4:$A

B2:  =SUM(FILTER(INDIRECT(A1);MONTH(INDIRECT(A2))=D1))
或者,与:

A1:  'foobar'!$A$4:$B
A2:  ="select B where month(A) = "&(D1-1)

B2:  =SUM(QUERY(INDIRECT(A1);A2;0))