在矩阵中计算帽子戏法获胜

发布于 2025-01-31 06:00:02 字数 321 浏览 1 评论 0原文

我想拥有一个脚本或公式来计算从左到右的64个单元格上连续的三个“ W”值的数量,并在标有“ HAT Tricks”的列中显示结果。公式/脚本必须能够复制到其他多行。

我已经起草了一个示例表

数据是摔跤手的矩阵,他们相互竞争,获胜或损失记录在矩阵中。矩阵的性质忽略了摔跤手无法与自己竞争的单元格,因此需要将其配置到脚本/公式中。这是我的意思的快速示例,其中X是与自我的竞争,数字是摔跤手ID:

  1  2  3
1 x  L  L
2 W  x  L
3 W  W  x

我只是一个没有很多编码知识的业余爱好者。感谢这篇文章引起的任何关注。感谢您抽出宝贵的时间。

I would like to have a script or formula to calculate the number of three consecutive "W" values on a row of 64 cells from left to right and display the result in a column labeled "Hat Tricks". The formula/script must be able to be copied to multiple other rows.

I have drafted an example sheet here.

The data is a matrix of wrestlers who compete against each other, and the win or loss is recorded in a matrix. The nature of the matrix ignores the cell where the wrestler cannot compete against themselves, thus this will need to be configured into the script/formula. Here is a quick example of what I mean, where x is a competition with the self and the numbers are wrestler IDs:

  1  2  3
1 x  L  L
2 W  x  L
3 W  W  x

I am just a hobbyist without a lot of coding knowledge. I am appreciative of any attention this post generates. Thanks for taking the time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寻找我们的幸福 2025-02-07 06:00:02

尝试:

=ARRAYFORMULA(LEN(REGEXREPLACE(REGEXREPLACE(TRIM(FLATTEN(QUERY(
 TRANSPOSE(B2:G7),,9^9))), "W W W", "1"), "[WL ]", )))

在此处输入图像描述“

try:

=ARRAYFORMULA(LEN(REGEXREPLACE(REGEXREPLACE(TRIM(FLATTEN(QUERY(
 TRANSPOSE(B2:G7),,9^9))), "W W W", "1"), "[WL ]", )))

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文