【问题标题】:Can I use a cell reference in another tab from a query select statement?我可以在查询选择语句的另一个选项卡中使用单元格引用吗?
【发布时间】:2021-03-19 15:13:38
【问题描述】:

我在 Google 表格中有两个标签。标签 A 和标签 B

在选项卡 A 中,我在单元格中使用以下语句:

=iferror(query('TabB'!$A$2:$H$50000,"select sum(E) where G = 'name@emailaddy.com' label sum(E) ''",0))

这行得通

我想让 name@emailaddy.com 动态化,以便它从 Tab A 中的单元格中提取

ex. =iferror(query('TabB'!$A$2:$H$50000,CONCATENATE("(select sum(E) where G = ","'name@emailaddy.com'"," label sum(E) ''",0)))

不起作用 - 我只是得到一个空白字段

我也尝试简单地聚合带有“+”号的字符串,但也不起作用。

我怎样才能达到效果?

【问题讨论】:

    标签: google-sheets google-sheets-formula google-query-language


    【解决方案1】:

    我很笨。想通了。

    =query('TabB'!$A$2:$H$50000,"select sum(E) where G = '" & TABA!E4 & "' label sum(E) ''",0)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-23
      • 2013-03-10
      • 2011-01-03
      • 1970-01-01
      • 2022-01-10
      • 2016-04-24
      • 2016-08-23
      • 1970-01-01
      相关资源
      最近更新 更多