简体   繁体   中英

Average wins per player

I'm not really good with Java, even less with Sheets and i need help for this :

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)".

It's for a team game and we use Google Sheets a lot for it; I wanted some stats too.

JavaScript != Java.

Additionally, there's no JavaScript involved here if you're just using Sheets.

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

Steps for understanding:

  1. COUNTIF all cells in a range containing the text "Win".
  2. COUNTA all cells in the same range, regardless of what they contain.
  3. Calculate the AVERAGE of those two values using the built-in function.

A2:A7 is just an example and should be replaced with whatever range your RESULT column takes up.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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