I have a column of numbers eg:
8
8
8
9
9
9
9
9
10
10
I want a pie chart to show that 30% of the data is 8, 50% is 9 and 20% is 10.
I found a website that says it can be done with pivot tables but then I got even more confused.
I have a column of numbers eg:
8
8
8
9
9
9
9
9
10
10
I want a pie chart to show that 30% of the data is 8, 50% is 9 and 20% is 10.
I found a website that says it can be done with pivot tables but then I got even more confused.
There’s a way to insert a chart in Excel. Highlight the numbers, then hit Chart Wizard on the toolbar.
Let’s assume you’re using Excel 2003. (I’m not an Excel expert, so this may not be the best way to do it…)
[ol]
[li]Make sure there’s a cell that provides a header for the column of data. If there’s no header currently, insert a row above the data and type “Foo” (without the quotes) or something.[/li][li]In the column of data, select the header cell (“Foo”) and the cells that have data.[/li][li]Click the “Data” menu item, then click “PivotTable and PivotChart Report”. The “PivotTable and PivotChart Wizard” will appear.[/li][li]In the wizard, just click “Finish”. You’ll get a new worksheet with a blank pivot table and a “PivotTable Field List” dialog (as well as a PivotTable toolbar). In the dialog, there should be one item in the list that’s in the dialog, with a label that matches the header cell you selected (“Foo”)[/li][li]Make sure the dropdown control at the bottom of the “PivotTable Field List” dialog shows “Row Area”.[/li][li]Select the item in the list and click the “Add To” button. The pivot table will update, with the first column showing one entry for each unique item in the column of data.[/li][li]Now go back to the “PivotTable Field List” dialog (it should still be there) and select “Data Area” in the dropdown control at the bottom.[/li][li]Click the “Add To” button again. The pivot table will now update again, and you’ll now see a “Total” column with the totals for each unique item in the original column of data.[/li][li]In the “Total” column, select the cells that have data (don’t select the cell that has the word “Total” in it, or the cell that has the grand total).[/li][li]Now go to the PivotTable toolbar. Click the button that’s the second from the right (“Field Settings”). The “PivotTable Field” dialog will appear.[/li][li]In the dialog, observe that the “Summarize by” list currently has “Sum” selected. Click “Count” instead, then click OK. The dialog will close, and the “Total” column in the pivot table will update so it shows the count of instances of each item rather than the sum.[/li]
(Now here is where the process may be less efficient because I don’t know the “right” way to do it…)
[li]In the pivot table, select the cells that have the values and the counts. Using the example in the OP, you would select just these cells:[/li]
8 3
9 5
10 2
[li]Hit ctrl-C to copy the selection.[/li][li]Go to a blank worksheet; create a new worksheet if necessary.[/li][li]Click in the first cell in the worksheet, then select “Edit” > “Paste Special” > “Values”. The data will be pasted in.[/li][li]Now select the cells in column B that have data in them (i.e., just the counts).[/li][li]Click “Insert” > “Chart”. The “Chart Wizard” will appear.[/li][li]In the “Chart type” list, select “Pie”, then click “Next”. You’ll be moved to a page that has two tabs at the top (“Data Range” and “Series”).[/li][li]Click the “Series” tab.[/li][li]For the “Category Labels” control, click the cell selector button at the far right. The wizard will hide and you’ll just get the control to select a set of data.[/li][li]Select the cells in column A that have data; you’ll see the cell data entered in the control. Click the button at the right of the control; you’ll return to the “Source Data” page of the wizard, and the “Category Labels” field will be updated with the cells you selected.[/li][li]Click Next and you can specify the title, labels, etc.[/li][li]Click Finish.[/li][/ol]
Thanks guys. It’s quite late now so I will try it in the morning.
**ivylass’s **answer doesn’t work in this case.
**Hunter Hawk’s **answer works but is hugely complicated for this simple task.
Here’s something easier that is not generic but works very well for your situation.
In B1, put 8
In C1 put 9
In D1 put 10
In B2 put the formula =COUNTIF($A:$A,B1)
Copy this formula to C2 and D2
Highlight the range of cells from B1:D2
From menu, Insert, Chart… and select pie chart.