向 Google Sheets 中的数组添加 OR 条件

问题描述 投票:0回答:1

我想向数组添加 OR 条件。

=ArrayFormula(LOOKUP(2,1/($E$4:E="Foo") OR $E$4:E="Bar"

更新我想我在示例中找到了答案......使用+号

=ArrayFormula(if((AG2:AG="Yes")+(AI2:AI<>""),"Ok","Blank"))

所以

=ArrayFormula(LOOKUP(2,1/($E$4:E="Foo") + $E$4:E="Bar"
=ArrayFormula(LOOKUP(2,1/if(($E$4:E="Foo") + $E$4:E="Bar"
arrays google-sheets conditional-statements
1个回答
0
投票

试试这个:

=ARRAYFORMULA(LOOKUP(2,1/(E4:E="Foo")+(E4:E="Bar")))

您还可以将

REGEXMATCH
与管道一起使用
|

=ARRAYFORMULA(LOOKUP(2,1/REGEXMATCH(E4:E,"^(Foo|Bar)$")))
© www.soinside.com 2019 - 2024. All rights reserved.