Saturday, December 14, 2013

How to Create a Box Plot in Microsoft Excel 2007


Set Up the Plot Data
1. Create a table with a column for each data set. In the table rows, add formulas for the calculations of (in order) the minimum, first quartile, median, third quartile and maximum for each data set using the Excel functions MIN, MAX, MEDIAN and QUARTILE (or PERCENTILE). This is the 'summary table.'
2. Create a second table with the same rows and columns as above. This table will contain the values used for the plot. This is the 'plot data table.'
3. Add a formula for each data set's maximum value in the plot data table that is the maximum minus the third quartile values from the summary table.
4. Add a formula for each data set's third quartile value in the plot data table that is the third quartile minus the median values from the summary table.
5. Add a formula for each data set's median value in the plot data table that is the median minus the first quartile values from the summary table.
6. Add a formula for each data set's first quartile value in the plot data table copying the first quartile value from the summary table.
7. Add a formula for each data set's minimum value in the data table table that is the first quartile minus the minimum values from the summary table.
Create the Plot
8. Select the range containing the third quartile, median and first quartile of all the data sets in the plot data table.
9. Open the Insert ribbon. Click 'Column' on the charts. Select 'Stacked Column' from the '2-D Column' type charts.
10. Click 'Select Data' under 'Design' on the 'Chart Tools' section of the ribbon. Modify the 'Series' order so 'Series 3' is the bottom segment on the chart and 'Series 1' is the top segment on the chart.
11. Click on the bottom segment of one of the columns in the chart. Select 'Layout' under 'Chart Tools' on the ribbon. Click 'Error Bars' and select 'More Error Bars Options.' The 'Format Error Bars' window appears.
12. Select 'Minus' for the 'Direction.' Select 'Custom' for the 'Error Amount.' Click 'Specify Value' and select the range for all the minimum values in the plot data table for the 'Negative Error Value' in the 'Custom Error Bars' window. Click 'OK' to exit this window and 'Close' on the next window to return to the chart.
13. Click on the top segment of one of the columns in the chart. Go to the 'Format Error Bars' window as above. Choose 'Plus' for the 'Direction' and use the maximum values in the plot data table for the 'Positive Error Value' range for the 'Custom Error Amount.'
14. Right-click on the bottom segment of one of the columns on the chart and select 'Format Data Series.' Set the 'Fill' to 'No fill.' Set the 'Border Color' to 'No line.' Close the window.
15. Delete the chart legend. Add polish by formatting the chart colors, adding a title and other finishing touches.
16. Select the rows containing the plot data table. Under 'Home' on the ribbon, click 'Format' and select 'Hide Rows' under the 'Hide Unhide' sub-menu.

Blogger news