如何使用动态数组筛选出另一个动态数组(非精确匹配)?

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

How would you filter out a dynamic array using a dynamic array (Non exact match)?

问题

这是昨天我发布的问题的后续。我在Excel中有两个动态数组,如图所示。一个是C1#,用于搜索的标准,另一个是F1#,我想要搜索的动态数组。我想要得到如"Wanted Output"所示的动态数组输出。我能够得到这个输出,但我不确定如何让它输出"None",包括单词"One",我目前只能让它输出完全匹配。有没有办法在不需要完全匹配的情况下做到这一点?谢谢。

英文:

This is a follow up to the question I posted yesterday. I have two dynamic arrays in excel, as shown in the image. One is C1#, which is the criteria for the search, and one is F1#, which is the dynamic array I want to search in. I want to get the dynamic array output as shown in the Wanted Output. I am able to get this output, however I am not sure how to get it to output "None", which includes the word "One", I am currently only able to get it to output exact matches. Is there any way to do this without requiring exact matches? Thank you.

如何使用动态数组筛选出另一个动态数组(非精确匹配)?

答案1

得分: 3

尝试使用 MMULT( )

如何使用动态数组筛选出另一个动态数组(非精确匹配)?


• 在单元格 I1 中使用的公式

=LET(
     a,TOROW("&"*C1#&"*"),
     b,SEQUENCE(ROWS(C1#),,,0),
     IF(MMULT(N(ISNUMBER(SEARCH(a,F1#))),b),F1#,""))

英文:

Try using <kbd>MMULT( )</kbd>

如何使用动态数组筛选出另一个动态数组(非精确匹配)?


• Formula used in cell I1

=LET(
     a,TOROW(&quot;*&quot;&amp;C1#&amp;&quot;*&quot;),
     b,SEQUENCE(ROWS(C1#),,,0),
     IF(MMULT(N(ISNUMBER(SEARCH(a,F1#))),b),F1#,&quot;&quot;))

答案2

得分: 2

Formula in G1:

=REPT(F1:F9,BYROW(ISERR(SEARCH(TEXTSPLIT(A2,";"),F1:F9)),LAMBDA(r,1-AND(r))))

英文:

ALternatively:

如何使用动态数组筛选出另一个动态数组(非精确匹配)?

Formula in G1:

=REPT(F1:F9,BYROW(ISERR(SEARCH(TEXTSPLIT(A2,&quot;,&quot;),F1:F9)),LAMBDA(r,1-AND(r))))

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

发表评论

匿名网友

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

确定