在另一列中搜索一个数字。

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

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,"")))

在另一列中搜索一个数字。

huangapple
  • 本文由 发表于 2023年2月19日 14:53:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/75498472.html
匿名

发表评论

匿名网友

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

确定