搜索范围中的12和13的公式

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

Formulae to search for 12 and 13 in a range

问题

使用公式:

=LET(data,transpose(filter('Arbor Feed Tutor List'!A:A,(SEARCH("13", 'Arbor Feed Tutor List'!A:A))) ),
IFNA(REDUCE(TOROW(,1),SEQUENCE(COLUMNS(data)),LAMBDA(a,i,HSTACK(a,INDEX(data,,i),"HP's",INDEX(data,,i),INDIRECT(ADDRESS(ROW(), COLUMN()+1)))))))

来搜索包含文本"13"的单元格

如何修改以搜索包含文本"13"或"12"的单元格
尝试使用OR函数,但没有成功

尝试过:

=LET(data,transpose(filter('Arbor Feed Tutor List'!A:A,(SEARCH(OR("13", "12"), 'Arbor Feed Tutor List'!A:A))) ),
IFNA(REDUCE(TOROW(,1),SEQUENCE(COLUMNS(data)),LAMBDA(a,i,HSTACK(a,INDEX(data,,i),"HP's",INDEX(data,,i),INDIRECT(ADDRESS(ROW(), COLUMN()+1)))))))


<details>
<summary>英文:</summary>

using formula:

=LET(data,transpose(filter('Arbor Feed Tutor List'!A:A,(SEARCH("13", 'Arbor Feed Tutor List'!A:A))) ),
IFNA(REDUCE(TOROW(,1),SEQUENCE(COLUMNS(data)),LAMBDA(a,i,HSTACK(a,INDEX(data,,i),"HP's",INDEX(data,,i),INDIRECT(ADDRESS(ROW(), COLUMN()+1)))))))

to search for cells which contain text &quot;13&quot; in them

How could I modify this to search for cells containing text &quot;13&quot; OR &quot;12&quot;
Tried the obvious using an OR function, no joy.

Thanks

Tried:
=LET(data,transpose(filter(&#39;Arbor Feed Tutor List&#39;!A:A,(SEARCH(OR(&quot;13, &quot;12&quot;), &#39;Arbor Feed Tutor List&#39;!A:A))) ),
IFNA(REDUCE(TOROW(,1),SEQUENCE(COLUMNS(data)),LAMBDA(a,i,HSTACK(a,INDEX(data,,i),&quot;HP&#39;s&quot;,INDEX(data,,i),INDIRECT(ADDRESS(ROW(), COLUMN()+1)))))))

</details>


# 答案1
**得分**: 0

尝试用以下内容替换 `SEARCH("13", 'Arbor Feed Tutor List'!A:A)`:

```plaintext
REGEXMATCH('Arbor Feed Tutor List'!A:A, "12|13")

如果字符串中找到了这些值中的任何一个,它将返回true。

英文:

Try replacing SEARCH(&quot;13&quot;, &#39;Arbor Feed Tutor List&#39;!A:A with:

REGEXMATCH( &#39;Arbor Feed Tutor List&#39;!A:A,&quot;12|13&quot;)

It will return true if any of those values are found in the string

huangapple
  • 本文由 发表于 2023年7月24日 18:45:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76753711.html
匿名

发表评论

匿名网友

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

确定