我在谷歌电子表格中使用Arrayformula来计算卫生调查的结果。
我想输出一组条件发生的总次数,例如:
有水储存,仅用于水和(储存有盖子或储存有龙头或......)
我正在使用的表格是:
=ArrayFormula( SUM(( 'Form Responses'!H:H = "has water storage" )*( 'Form Responses'!K:K = "only uses for water" )))
我想要这样的东西:
=ArrayFormula( SUM(( 'Form Responses'!H:H = "has water storage" )*( 'Form Responses'!K:K = "nly uses for water" )*(anyoffthe following:storage has lid OR storage has spigot OR..) ))
如何添加最终OR子句而不必写出所有组合?
由于
答案 0 :(得分:2)
尝试使用加号。它将布尔值视为0或1,因此至少为1的总和将返回TRUE。
=ArrayFormula( SUM(( 'Form Responses'!H:H = "a" )*('Form Responses'!H:H = "c" + 'Form Responses'!H:H = "d" + 'Form Responses'!H:H = "e") ))