英文:
search for a number in another column
问题
我有一个大型数据集,在其中,列 A 有一个ID,列 B(带有ID的文本)。我希望列 C 显示该值是否存在,如果存在,则留空单元格,如果不存在,则显示应该在单元格中的数字。
ID 将从最左侧开始(如截图所示)。
我使用了 "=REGEXMATCH(B2:B, A2:A)",但它没有起作用。
谢谢
英文:
I have a large dataset, in it, Column A has an ID, and in Column B (texts with ID). I want Column C to display if the value exists or not if exists then leave the cell blank if not then show the number which should be in the cell.
The IDs will start from the first left (as shown in the screenshot).
I used the "=REGEXMATCH(B2:B(A2:A))" but it didn't work.
Thank you
答案1
得分: 1
尝试以下公式-
=MAP(A2:A4,B2:B4,LAMBDA(x,y,IF(REGEXMATCH(y,x&"")=FALSE,X,"")))
要将整列作为`MAP()`函数的输入,请使用-
=MAP(A2:INDEX(A2:A,COUNTA(A2:A)),B2:INDEX(B2:B,COUNTA(A2:A)),LAMBDA(x,y,IF(REGEXMATCH(y,x&"")=FALSE,X,"")))
[![enter image description here][1]][1]
英文:
Try the following formula-
=MAP(A2:A4,B2:B4,LAMBDA(x,y,IF(REGEXMATCH(y,x&"")=FALSE,X,"")))
To refer full column as input to MAP()
function, use-
=MAP(A2:INDEX(A2:A,COUNTA(A2:A)),B2:INDEX(B2:B,COUNTA(A2:A)),LAMBDA(x,y,IF(REGEXMATCH(y,x&"")=FALSE,X,"")))
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论