Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel - Make a graph that shows number of occurrences of each value in a column

Tags:

excel

I am trying to make a graph (like a bar graph, number of occurrences on the y and value on the x) that will show each value in a column and the number of times it occurs. How will I do this?

I am using Excel 2013

like image 587
reconrey Avatar asked Nov 02 '13 03:11

reconrey


People also ask

How do you use Excel to count number of occurrences in a column?

In Excel, I can tell you some simple formulas to quickly count the occurrences of a word in a column. Select a cell next to the list you want to count the occurrence of a word, and then type this formula =COUNTIF(A2:A12,"Judy") into it, then press Enter, and you can get the number of appearances of this word. Note: 1.

How do I plot multiple sets of data on one graph in Excel?

Choose "All Charts" and click "Combo" as the chart type. From the options in the "Recommended Charts" section, select "All Charts" and when the new dialog box appears, choose "Combo" as the chart type. These let Excel know you want to work with multiple data sets before you even edit the graph.


1 Answers

There is probably a better way to do this, but this is a working example. Let's assume this is your data:

+---+
| 4 |
| 4 |
| 5 |
| 6 |
| 7 |
| 7 |
| 7 |
| 8 |
| 9 |
+---+

Copy this column and paste it into column B. Highlight it and hit Remove Duplicates. In C1, paste this formula: =COUNTIF(A:A;B1) (Use a ; in Excel 2010+, otherwise use a ,). In the bottom right corner of C1, click the black square and drag it down until you've reached the bottom of column B.

Now your spreadsheet should look something like this (except with the formula result rather than the formula itself):

+---+---+------------------+
| A | B |        C         |
+---+---+------------------+ // Actual values of column C
| 4 | 4 | =COUNTIF(A:A;B1) | // 2
| 4 | 5 | =COUNTIF(A:A;B2) | // 1
| 5 | 6 | =COUNTIF(A:A;B3) | // 1
| 6 | 7 | =COUNTIF(A:A;B4) | // 3
| 7 | 8 | =COUNTIF(A:A;B5) | // 1
| 7 | 9 | =COUNTIF(A:A;B6) | // 1
| 7 |   |                  |
| 8 |   |                  |
| 9 |   |                  |
+---+---+------------------+

Finally, create a graph as you normally would. Make your Legend Entries (Series) your column C, and your Horizontal (Category) Axis Labels column B.

This will result in a graph looking like this: Resulting Graph

like image 65
gkubed Avatar answered Nov 15 '22 00:11

gkubed