如何在Google Spreadsheet中使用OR语句嵌套IF块 [英] How to nest IF block with OR statement in Google Spreadsheet
本文介绍了如何在Google Spreadsheet中使用OR语句嵌套IF块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一些有关我在Google电子表格中使用的小代码的帮助:
I'm looking for some help with this little code that I'm using in Google spreadsheet:
=ArrayFormula(IF(OR(F2:F="Cancelled",G2:G="Cancelled"),"Cancelled",IF(F2:F="Finished",20,)+IF(G2:G="Finished",20,)))
由于某种原因,如果我使用此代码而不调用多行,它将起作用:
For some reason it works if I use this code without calling multiple rows:
=ArrayFormula(IF(OR(F2="Cancelled",G2="Cancelled"),"Cancelled",IF(F2="Finished",20,)+IF(G2="Finished",20,)))
有没有人知道使用它的正确方法?
Does anyone have an idea which is the correct way to use it?
先谢谢了.
推荐答案
OR
将所有 TRUE
合并为一个值,并且不保持数组大小.
OR
merges all TRUE
s to one value and does not maintain array size.
您需要使用 +
代替 OR
;就像
=ARRAYFORMULA(IF((F2:F="Cancelled")+(G2:G="Cancelled"), "Cancelled".... ))
这篇关于如何在Google Spreadsheet中使用OR语句嵌套IF块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文