英文:
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 "13" in them
How could I modify this to search for cells containing text "13" OR "12"
Tried the obvious using an OR function, no joy.
Thanks
Tried:
=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>
# 答案1
**得分**: 0
尝试用以下内容替换 `SEARCH("13", 'Arbor Feed Tutor List'!A:A)`:
```plaintext
REGEXMATCH('Arbor Feed Tutor List'!A:A, "12|13")
如果字符串中找到了这些值中的任何一个,它将返回true。
英文:
Try replacing SEARCH("13", 'Arbor Feed Tutor List'!A:A
with:
REGEXMATCH( 'Arbor Feed Tutor List'!A:A,"12|13")
It will return true if any of those values are found in the string
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论