Excel Control Chart Add-In – Documentation

Quick Links

Control chart Installation – Excel 2007 and Later
Control chart Installation – Excel 2003 and Earlier
Usage – How to use the Control chart Utility
Adding Reference to Control chart Library From Other Functions in a VBA Project
Syntax for Calling the Control chart from Other Functions

excel-control-chart-utility

Installation – Excel 2007 and Later

Here are the steps to set-up the control chart utility in Excel 2007 and later.

zipped-control-chart-add-in

Step 1 – Extract the contents of the zipped file to a permanent Folder – Once you have downloaded the excel control chart and the ribbon add-ins, extract both the files to a permanent folder.

Step 2 – Open a Blank Workbook and Attach the Add-In – Click on the ‘File’ tab on the Ribbon

Step 3 – Click on the ‘Options’ under the ‘File’ tab.

Step 4 – Click on Add-Ins
how-to-use-the-treemap-as-an-excel-add-in-part-3

Step 5 – Click on the ‘Go’ button

Step 6 – Click on the ‘Browse’ button – Browse to the folder where the Control chart Add-In was extracted.
how-to-use-the-control-chart-as-an-excel-add-in-part-5

Step 7 – Select the file and click ‘OK’ – Enable the option that reads ‘Control chart’.
how-to-use-the-control-chart-as-an-excel-add-in-part-6

Step 8 – Click ‘Ok’ twice
how-to-use-the-control-chart-as-an-excel-add-in-part-7

Step 9 – A new tab has been added to the ribbon
excel-control-chart

Installation – Excel 2003 and Earlier

Here are the steps to set-up the control chart maker in Excel 2003 and earlier.

zipped-control-chart-add-in

Step 1 – Extract the contents of the zipped file to a permanent Folder – Once you have downloaded the excel control chart and the ribbon add-ins, extract both the files to a permanent folder. If you are only going to use this add-in with the Excel 2003 or earlier versions, you may ignore the ribbon add-in.)

how-to-use-the-treemap-as-an-excel-2003-add-in-part-1

Step 2 – Open a Blank Workbook and Attach the Add-In – Click on the ‘Tools’ -> ‘Add-Ins’ option on the toolbar.

Step 3 -Click on Browse and navigate to the folder where the add-in was extracted.
how-to-use-the-treemap-as-an-excel-2003-add-in-part-3

Step 4 – Select the add-in and click ‘OK’ twice
how-to-use-the-control-chart-as-an-excel-2003-add-in-part-4

Step 5 – A new menu option is added to the toolbar
how-to-use-the-control-chart-as-an-excel-2003-add-in-part-5

Usage

Use the ribbon using Excel 2007 (and later versions) and the menu toolbar in Excel 2003 (and earlier versions) and click the “Control Chart” button.
excel-2010-ribbon-view

The control chart user interface lets you configure the various options for the chart. You can specify the number of control limits to show, highlight outliers, static or dynamic display of plot vlaues, choose line and plot area colors, line and border styles, marker size / style, significant digits, label various elements, font size, chart size and the location on the sheet.
control-chart-configuration-ui

Select the data range beforehand or select a range using the range input box, specify the options as per your preference and click ‘OK’. The finished control chart will be placed in the same worksheet.

select-range-for-control-chart

The last column of the data range should contain numeric values.

Call Control Chart Function From Other Functions in a VBA Project

You can also call the control chart function from other modules in the project. To access the control chart library, simply include a reference to the CHARTMAKER_CONTROLCHART library from the VBA IDE.

control-chart-vba-reference

Check the option box next to CHARTMAKER_CONTROLCHART library. You can now freely use the objects in library.

reference-chartmaker-control-chart-vba

Syntax for Calling the Control Chart from Other Functions

(If you want to use the shortest form, skip over to the section immediately below)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Sub draw_control_chart()
Dim my_chart as ChartObject
Set my_chart  = CONTROL_CHART( _
control_chart_range , _
control_chart_range_has_headers , _
chart_title , _
x_axis_title , _
y_axis_title , _
dynamic_nature_of_chart , _
custom_sigma_control_limit , _
highlight_outliers_beyond_sigma_limit , _
one_sigma_control_limit_line_color , _
two_sigma_control_limit_line_color , _
three_sigma_control_limit_line_color , _
custom_sigma_control_limit_line_color , _
plot_line_color , _
plot_area_color , _
plot_line_style , _
number_of_significant_digits , _
plot_line_marker_size, _
plot_line_marker_style , _
chart_width As Double , _
chart_height As Double , _
chart_offset_top , _
chart_offset_left , _
label_data_values )
End Sub

The CONTROL_CHART function has the following arguments:

control_chart_range : The control chart range used to plot the chart. Can be one or two dimensional. If two dimensional data range is used, the values along the first range are taken as x-axis labels. This is the only argument in the list that is mandatory.
control_chart_range_has_headers : Boolean flag indicating whether the control chart range specified above has headers. If TRUE, the chart x-axis and y-axis titles will be picked up from the specified range. Default = False.
chart_title : String, user specified chart title. Default = “Control Chart”.
x_axis_title : String, user specified chart x-axis title. Default = “Observations”.
y_axis_title : String, user specified chart y-axis title. Default = “Range”.
dynamic_nature_of_chart : Boolean flag indicating whether the final chart should remain linked to underlying data source or should be made static/standalone. Default = “True”.
custom_sigma_control_limit : User defined custom control limit. Leave empty if you do not want to show a custom control limit (apart from the default 1, 2 and 3 sigma limits). Default = 0.
highlight_outliers_beyond_sigma_limit : Indicates the cut-off for the control limit for highlighting outliers. Points beyond this control limit will be highlighted. Default = 1.
one_sigma_control_limit_line_color : Numeric value of line color to be used for one sigma control limit. Default = Deep Red.
two_sigma_control_limit_line_color : Numeric value of line color to be used for two sigma control limit. Default = Deep Red.
three_sigma_control_limit_line_color : Numeric value of line color to be used for three sigma control limit. Default = Deep Red.
custom_sigma_control_limit_line_color : Numeric value of line color to be used for custom sigma control limit. Default = Black.
plot_line_color : Numeric value of line color to be used for plot line color. Default = Black.
plot_area_color : Numeric value of color to be used for the chart area background. Default = Light Grey.
plot_line_style : Numeric value for the line style to be used for plotting data points. Default = Solid. Permissible values = 1, 2, 3, 4 or 5. Default = 1.
number_of_significant_digits : Number of significant digits to use to show data values and control limit labels. Note : The calculations for various chart elements are not truncated, only the display is.
plot_line_marker_size : Numeric value indicating the marker size to use specify the marker size. Min = 2, Max 72.
plot_line_marker_style : Numeric value for the line style to be used for plotting data points. Default = Solid. Permissible values = 1, 2, 3, 4 or 5. Default = 1 (circle).
chart_width As Double : Chart width. Default = 400.
chart_height As Double : Chart height Default = 275.
chart_offset_top : Offset from the top. Default = 50.
chart_offset_left : Offset from the left. Default = 100.
label_data_values : Boolean flag used to specify whether the points on the chart plot series should be labelled. Default = False.

Easy Way to Use the CONTROL_CHART Function

If the above looks daunting, don’t worry. Only the first argument (data range) is mandatory and the rest are optional. So you can create a control chart by writing something as simple as :

1
2
3
4
Sub draw_control_chart()
Dim my_chart as ChartObject
Set my_chart = CONTROL_CHART(selection)
End Sub

or

1
2
3
4
5
Sub draw_control_chart()
'SPECIFY A RANGE AND CONTROL CHART WITH HEADER
Dim my_chart as ChartObject
Set my_chart =  = CONTROL_CHART(selection, True)
End Sub

If you want to customize it further, you can add more parameters

1
2
3
4
5
Sub draw_control_chart()
Dim my_chart as ChartObject
'SPECIFY SOME OF THE PARAMETERS
Set my_chart = CONTROL_CHART(Range(Cells(1, 1), Cells(500, 2)), True, "Experiment Chart", "Plot", "Range", False, 4, 3, 0, 0, 0, 0, 123567, 543652, 2, 4, 3, 500, 400, 50, 50, True)
End Sub

You can even omit parameters that you don’t want. So the following is good enough.

1
2
3
4
5
Sub draw_control_chart()
Dim my_chart as ChartObject
'SPECIFY ALL THE PARAMETERS
Set my_chart = CONTROL_CHART(Selection, 2, , , , , , , , , , , , , , , , 500 , 200 , , , True)
End Sub

Once the call finishes, the function returns a handle to the chart object which you can then be used further in your VBA module.

Click here to buy the Control chart utility for Excel. It has been tested to work with Excel versions – 2000, 2003, 2007 and 2010 (windows versions).

Add to Cart

View Cart

Subscribe

Keep up with the latest stories - Delivered right to your inbox
feedburner

Translate

English flagItalian flagKorean flagChinese (Simplified) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagDutch flagHindi flagFilipino flagIndonesian flagThai flagTurkish flagPersian flag
treeemap software for excel


ARCHIVES