1

I have a spreadsheet which keeps track of duels between two players in a game. Each row has the number of the match and the winner, given by their initial, X or Y. I want to know if it's possible to get a percentage for how many of the total matches have been won by player X or Y, and maybe make some sort of pie chart.

If that IS possible, then I'd also like to know if it's possible to group results by date. Imagine if there was a third column with the date of each match, would it be possible to create a pie chart for each month? October, November, etc.

2 Answers 2

2

Use COUNTIF, e.g. to get a percentage for how many of the total matches have been won by player X: =(COUNTIF(A2:A10,"=X")/COUNTA(A2:A10)*100.

For the grouping, I think you need to use QUERY (GROUP BY).

2
  • Could you elaborate on the QUERY? Nov 11, 2013 at 9:27
  • E.g. =query(J:L,"select count(K) group by L, J", 0) where J is the winner name, K the date, L = MONTH(K). Nov 11, 2013 at 20:14
1

As often, I suggest a pivot table. For the months and pie charts however I would recommend in addition a column to indicate the month, say just the number with something like:

=month(D2)

in E2 copied down to suit.

WA51790 example

The pie charts can be plotted by selecting such as shown in the image for February. Percentages won by player can be derived from the Grand Total row (5/9 and 4/9 in the example).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.