找到与给定关键词匹配的第01等级元素。

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

Find the Rank 01 Matching element against the Given Key word

问题

I have two tables, Table two with code and Key words.

Table 01

Table 01 With combination of Key words, SO need to find the height matching row of each description and need to give the rank one matching code as code against the Description.

For Easy reference I added video in LOOM, please refer below video.

I created G- Sheet as well, If it is easy, please provide the solution on that.

Best regard
Indika

英文:

I have two tables, Table two with code and Key words.

找到与给定关键词匹配的第01等级元素。

Table 01

找到与给定关键词匹配的第01等级元素。

Table 01 With combination of Key words, SO need to find the height matching row of each description and need to give the rank one matching code as code against the Description.

For Easy reference I added video in LOOM, please refer below video.

https://www.loom.com/share/fbabeb8f190b44c7b88e82f90770c8eb?sid=5852e721-c471-4fbf-a0dd-191235e4a2fa

I created G- Sheet as well, If it is easy, please provide the solution on that.

https://docs.google.com/spreadsheets/d/1OvxT1gpkUncEvPxLaf_ob6qqwijciEQ0AjfPn7qJyT0/edit?usp=sharing

Best regard
Indika

答案1

得分: 2

以下是您提供的内容的中文翻译:

如果我理解正确,那么这应该有效。假设没有Excel约束,也就是说根据您的标签,我们假设您在使用MS365


• 单元格B2中使用的公式

=LET(
a,HSTACK($D$2:$D$8,
BYROW(SIGN(IFERROR(XMATCH($E$2:$K$8,TEXTSPLIT(A2," ")),0)),LAMBDA(x,SUM(x)))),
@SORT(a,2,-1))

或者,使用<kbd>MAP()</kbd>


• 单元格B2中使用的公式

=MAP(A2:A6,LAMBDA(a,
LET(b,TEXTSPLIT(a,&quot; &quot;),
d,BYROW(SIGN(IFERROR(XMATCH(E2:K8,b),0)),LAMBDA(c,SUM(c))),
e,HSTACK(D2:D8,d),@SORT(e,2,-1))))

另一种不使用<kbd>LAMBDA()</kbd>的替代方法


• 单元格B2中使用的公式

=LET(
     a,N(IFERROR(XMATCH($E$2:$K$8,TEXTSPLIT(A2,&quot; &quot;)),0)&lt;&gt;0),
     b,HSTACK($D$2:$D$8,MMULT(a,SEQUENCE(ROWS(a),,,0))),
     @SORT(b,2,-1))

如果您想要一个单一的数组公式。

=MAP(A2:A6,LAMBDA(m,LET(
       a,N(IFERROR(XMATCH($E$2:$K$8,TEXTSPLIT(m,&quot; &quot;)),0)&lt;&gt;0),
       b,HSTACK($D$2:$D$8,MMULT(a,SEQUENCE(ROWS(a),,,0))),
       @SORT(b,2,-1))))

英文:

If I have understood correctly, then this would work. Assuming there is no Excel Constraints, i.e. we assume as per your tags you are using MS365

找到与给定关键词匹配的第01等级元素。


• Formula used in cell B2

=LET(
a,HSTACK($D$2:$D$8,
BYROW(SIGN(IFERROR(XMATCH($E$2:$K$8,TEXTSPLIT(A2,&quot; &quot;)),0)),LAMBDA(x,SUM(x)))),
@SORT(a,2,-1))

Or, Using <kbd>MAP()</kbd>

找到与给定关键词匹配的第01等级元素。


• Formula used in cell B2

=MAP(A2:A6,LAMBDA(a,
LET(b,TEXTSPLIT(a,&quot; &quot;),
d,BYROW(SIGN(IFERROR(XMATCH(E2:K8,b),0)),LAMBDA(c,SUM(c))),
e,HSTACK(D2:D8,d),@SORT(e,2,-1))))

Another alternative approach without using <kbd>LAMBDA()</kbd>

找到与给定关键词匹配的第01等级元素。


• Formula used in cell B2

=LET(
     a,N(IFERROR(XMATCH($E$2:$K$8,TEXTSPLIT(A2,&quot; &quot;)),0)&lt;&gt;0),
     b,HSTACK($D$2:$D$8,MMULT(a,SEQUENCE(ROWS(a),,,0))),
     @SORT(b,2,-1))

If you want a single array formula.

找到与给定关键词匹配的第01等级元素。


=MAP(A2:A6,LAMBDA(m,LET(
       a,N(IFERROR(XMATCH($E$2:$K$8,TEXTSPLIT(m,&quot; &quot;)),0)&lt;&gt;0),
       b,HSTACK($D$2:$D$8,MMULT(a,SEQUENCE(ROWS(a),,,0))),
       @SORT(b,2,-1))))

huangapple
  • 本文由 发表于 2023年7月4日 22:32:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/76613663.html
匿名

发表评论

匿名网友

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

确定