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
Google sheets Google sheets比较不同工作表上的两个字段,并根据条件返回一个字段_Google Sheets - Fatal编程技术网

Google sheets Google sheets比较不同工作表上的两个字段,并根据条件返回一个字段

Google sheets Google sheets比较不同工作表上的两个字段,并根据条件返回一个字段,google-sheets,Google Sheets,我有两个不同的谷歌表。掌握销售和预测。在Master Sales上,我有两列,Expected&Billed,其数据按计费周细分 我需要表2从单元格中获取数据,该单元格不是0,因为我们正在尝试跟踪当月的总销售额(预期和实际),然后在月末,我们将得到实际的账单数字 下面是一个土豆的例子 表1 A B 1 Expect Billed 2 $123 $145 3 $145 $155 4 $156 $0 5 $132 $0 表2应该是什

我有两个不同的谷歌表。掌握销售和预测。在Master Sales上,我有两列,Expected&Billed,其数据按计费周细分

我需要表2从单元格中获取数据,该单元格不是0,因为我们正在尝试跟踪当月的总销售额(预期和实际),然后在月末,我们将得到实际的账单数字

下面是一个土豆的例子

表1

   A        B  
1 Expect  Billed  
2 $123    $145  
3 $145    $155  
4 $156    $0  
5 $132    $0
表2应该是什么样的

  A      B
1 Week1  $145  
2 Week2  $155  
3 Week3  $156  
4 Week4  $132

假设您将安排周数,请在B1中尝试:

={query(Sheet1!A2:B5,"select B where B<>0",0);query(Sheet1!A2:B5,"select A where B=0",0)}
={query(Sheet1!A2:B5,“选择B,其中B0”,0);query(Sheet1!A2:B5,“选择A,其中B=0”,0)}