简体   繁体   English

每位玩家的平均胜利

[英]Average wins per player

I'm not really good with Java, even less with Sheets and i need help for this : 我对Java不太满意,甚至对Sheets都不满意,为此我需要帮助:

I want to create a list of average win of players using a list with several other players : 我想使用其他几个球员的名单来创建球员的平均获胜名单:

Example (I want to get the average on the right): 示例(我想在右边获得平均值):

电子表格示例

Conceptually this would be "for each player, see if the player match and if he won (ratio 1:1) then continue until there is no more game (or the end of the array)". 从概念上讲,这将是“对于每个玩家,查看该玩家是否匹配,以及他是否赢了(比率1:1),然后继续进行直到没有更多游戏(或数组结束)”。

It's for a team game and we use Google Sheets a lot for it; 这是一个团队游戏,为此我们经常使用Google表格; I wanted some stats too. 我也想要一些统计数据。

JavaScript != Java. JavaScript!= Java。

Additionally, there's no JavaScript involved here if you're just using Sheets. 此外,如果您仅使用表格,则此处不涉及JavaScript。

=AVERAGE(COUNTIF(A2:A7, "Win")/COUNTA(A2:A7))

Steps for understanding: 理解步骤:

  1. COUNTIF all cells in a range containing the text "Win". COUNTIF包含文本“ Win”的范围内的所有单元格。
  2. COUNTA all cells in the same range, regardless of what they contain. COUNTA所有单元格在相同范围内,无论它们包含什么内容。
  3. Calculate the AVERAGE of those two values using the built-in function. 使用内置函数计算这两个值的AVERAGE

A2:A7 is just an example and should be replaced with whatever range your RESULT column takes up. A2:A7只是一个示例,应该用RESULT列占用的任何范围替换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM