Reputation: 77
I asked a similar question a little while ago. I was basically just learning how to count the number of recurrences of a string in a range (using =COUNTIF()). I am now doing a very similar task, but I think it will be much more complex to solve. So say for example I have a data set:
Gnar
Gnar
Anivia
Gnar
Sejuani
Malzahar
Malzahar
Malzahara
Sejuani
Gnar
(Yes I am doing a stats sheet for me and my team for League of Legends)
So I would like to ultimately have a pie chart or something with my percentage play of each champ (this will be a huge data set of 100's of games per year) How can I have a pie chart or some other chart that shows the number of times each separate string appears in a range without me already having put it in.
If you need any clarification let me know!
Thanks,
William
Upvotes: 1
Views: 62
Reputation: 20463
PivotTables
and PivotCharts
will be your friends on this one...
Place those names in a column, let's say column A
. It would be wise to insert a row header, I used Title in the my example.
Select the range, and do Insert > PivotTable
. Once the PivotTable is created, drag Title (or whatever you named the header) down to Row Labels
. Next drag Title again the Values
section. Icing on the cake would be drag Title yet again, to Values
and then click the second count column created in the PivotTable and elect for Show Values As > % of Column Total
.
If you just want a bar chart, you can remove the percent column, click on the Pivot Table, and hit ALT+F1
to create a PivotChart. Although, you will probably want to apply some cleanup formatting to get the final result below.
Upvotes: 2