列出相互作用矩阵中的组合。

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

Listing the Combinations in an Interaction Matrix

问题

我想自动化生成一个组合列表的过程,由交互矩阵的结果确定:

我有一个交互矩阵。 "x" 表示两个部分之间的交互:

列出相互作用矩阵中的组合。

我已经开始列出组合的过程,并已经能够列出具有各自频率的A部分项目:

列出相互作用矩阵中的组合。

我使用VLOOKUP函数将索引值与每个A部分行的"x"计数的累积总和进行比较。

我想要的是一种方法,可以在表格B4:L14中查找列R中的值,然后找到它们各自行中"x"的实例,然后查找第4行中每个"x"实例对应的B部分。

例如,单元格S5:S9应该有值[2; 3; 4; 6; 9]

问:是否可以使用内置函数来实现这一点,还是我需要编写自定义的VBA代码?

非常感谢。

英文:

I would like to automate the process of generating a list of combinations determined by the result of an interaction matrix:

I have an interaction matrix. "x" denotes an interaction between two parts:

列出相互作用矩阵中的组合。

I have started the process of listing the combinations and have been able to list Part A items with their respective frequency:

列出相互作用矩阵中的组合。

I use the VLOOKUP function to compare the index value to the aggregate which is the cumulative sum of the "x" count for each Part A row.

What I would like is a method to look up a value in column R across table B4:L14 then find the instances of "x" in their respective rows and then lookup at row 4 which Part B corresponds to each "x" instance.

e.g. cells S5:S9 should have the values [2; 3; 4; 6; 9]

Q. Is this achievable using inbuilt functions, or will I have to write custom VBA code?

Much appreciated

答案1

得分: 2

在 Office 365 中:

=LET(
rng,$C$5:$L$14,
hd,$C$4:$L$4,
rw,$B$5:$B$14,
INDEX(FILTER(hd,FILTER(rng,rw=R5)="x"),,COUNTIF($R$5:R5,R5)))


[![enter image description here][1]][1]

较旧版本

=INDEX($4:$4,AGGREGATE(15,7,COLUMN($C$5:$L$14)/(($B$5:$B$14=R5)*($C$5:$L$14="x")),COUNTIF($R$5:R5,R5)))


[![enter image description here][2]][2]


  [1]: https://i.stack.imgur.com/nAWyc.png
  [2]: https://i.stack.imgur.com/Eoz3u.png
英文:

with Office 365:

=LET(
    rng,$C$5:$L$14,
    hd,$C$4:$L$4,
    rw,$B$5:$B$14,
    INDEX(FILTER(hd,FILTER(rng,rw=R5)="x"),,COUNTIF($R$5:R5,R5)))

列出相互作用矩阵中的组合。

Older versions

=INDEX($4:$4,AGGREGATE(15,7,COLUMN($C$5:$L$14)/(($B$5:$B$14=R5)*($C$5:$L$14="x")),COUNTIF($R$5:R5,R5)))

列出相互作用矩阵中的组合。

huangapple
  • 本文由 发表于 2023年3月3日 22:46:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/75628521.html
匿名

发表评论

匿名网友

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

确定