如何从另一个工作簿中计算是/否下拉答案?

huangapple go评论64阅读模式
英文:

How do I count Yes / NO drop-down answers from another workbook?

问题

我有一个下拉框,在我的源Google表格工作簿的H列中,有一个名为“Answers 2023”的选项,其中有一个“是”或“否”的选项。

我试图计算从该下拉框中选择“是”的次数,并将该数字放入主工作簿。随着时间的推移,该列将添加更多内容,因此我试图创建一个可以查看整个列而不仅仅是已填充的行范围的公式。

到目前为止,我一直在尝试使用这个公式,但没有成功:

=QUERY(IMPORTRANGE(“url”;”Answers 2023!H:H");"select H Count(H) where H ="Yes"")

我还尝试用Col8替换H:

=QUERY(IMPORTRANGE(“url”;”Answers 2023!H:H");"select Col8 Count(Col8) where Col8 ="Yes"")

甚至尝试使用“,”替代“;”:

=QUERY(IMPORTRANGE(“url”, ”Answers 2023!H:H"), "select Col8 Count(Col8) where Col8 ="Yes"")

有人有什么建议吗?

英文:

I have a drop down with a "Yes" or "No" option in column H of my source Google Sheet workbook, on a tab called "Answers 2023"

I'm trying to count the number of times "Yes" is selected from that drop down in column H,and pull that number in to a master workbook. The column will have more added to it over time, so I was trying to create the formula to look at the entire column, not just a range of the rows that are already populated.

So far, I've been trying to use this formula, with no luck:

=QUERY(IMPORTRANGE(“url”;”Answers 2023!H:H");"select H Count(H) where H ="Yes"")

I've also tried replacing H with Col8:

=QUERY(IMPORTRANGE(“url”;”Answers 2023!H:H");"select Col8 Count(Col8) where Col8 ="Yes"")

Even using "," in place of ";"

=QUERY(IMPORTRANGE(“url”, ”Answers 2023!H:H"), "select Col8 Count(Col8) where Col8 ="Yes"")

Anyone have any suggestions?

答案1

得分: 1

试试以下的代码:

=QUERY(IMPORTRANGE("url"; "Answers 2023!H:H");
       "select Col1, count(Col1) where Col1 ='yes' 
        group by Col1 label count(Col1) '' ")
英文:

Try the following

=QUERY(IMPORTRANGE("url"; "Answers 2023!H:H");
      "select Col1, count(Col1) where Col1 ='yes' 
       group by Col1 label count(Col1) '' ")

(Do adjust the formula according to your ranges and locale)

Make sure you use correctly your single and double quotes.

答案2

得分: -1

这解决了我的最初问题

=COUNTIF(IMPORTRANGE("url", "Answers 2023!H:H"), "No")

英文:

This solved my original inquiry

=COUNTIF(IMPORTRANGE("url", "Answers 2023!H:H"), "No")

huangapple
  • 本文由 发表于 2023年3月7日 09:15:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/75657232.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定