在Google表格中如何获取多列的索引?

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

How to get the index of multiple column in google sheet?

问题

这是您的翻译内容:

所以我有一个像这样的表格:

车型 约翰 迈克 路易斯 约翰
宝马 x
奔驰 x
尼桑 x
本田 x

假设我有一个单元格里面有约翰的名字,我想在它下面得到:
宝马
尼桑

使用我的公式,我只得到了宝马
我的公式:=IFERROR(FILTER(P4:P7, INDEX(Q4:T7, 0, MATCH(P9, Q3:T3, 0))="x"))
当然,因为MATCH只返回第一个约翰的索引,有什么解决方法吗?

英文:

So I have a table like this:

cars John Mike Louis John
BMW x
Benz x
Nissan x
Honda x

lets's say I have a cell with John name inside I would like to get underneath it :
BMW
Nissan

Using my formula am getting only BMW
my formula: =IFERROR(FILTER(P4:P7, INDEX(Q4:T7, 0, MATCH(P9, Q3:T3, 0))="x"))
sure cause MATCH returns one index which is the first john, any idea how to solve this?

答案1

得分: 1

Sure, here are the translated parts:

使用以下公式-

=TEXTJOIN(", ",1,FILTER(A2:A5,BYROW(INDEX((B1:E1=H1)*(B2:E5<>"")),LAMBDA(x,OR(X)))))

另一种方法可能是-

=JOIN(", ",FILTER(A2:A5, BYROW(FILTER(B2:E5,B1:E1=H1)="x",LAMBDA(x,OR(x)))))

英文:

Use the following formula-

=TEXTJOIN(&quot;, &quot;,1,FILTER(A2:A5,BYROW(INDEX((B1:E1=H1)*(B2:E5&lt;&gt;&quot;&quot;)),LAMBDA(x,OR(X)))))

Another approach could be-

=JOIN(&quot;, &quot;,FILTER(A2:A5, BYROW(FILTER(B2:E5,B1:E1=H1)=&quot;x&quot;,LAMBDA(x,OR(x)))))

在Google表格中如何获取多列的索引?

huangapple
  • 本文由 发表于 2023年5月18日 08:00:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76276899.html
匿名

发表评论

匿名网友

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

确定