Peltier Technical Services, Inc.
 

Excel Chart Add-Ins | Training | Charts and Tutorials | Peltier Tech Blog


Peltier Tech Chart Utilities for Excel Peltier Tech Panel Chart Utility Peltier Tech Waterfall Chart Utility Peltier Tech Cluster-Stack Chart Utility Peltier Tech Box and Whisker Chart Utility Peltier Tech Marimekko Chart Utility Peltier Tech Dot Plot Utility Peltier Tech Cascade Chart Utility

 

Excel Dashboards

 

Books at Amazon.com

 

VBA Charting Techniques


 


Align (Overlay) Charts

This zipped workbook contains the code that aligns Chart 2 on top of Chart 1, then erases everything out of Chart 2, except for the plotted series.

Top of Page


Align Chart Dimensions.

This zipped add-in enables you to make charts consistent in size, across the X axis, the Y axis, or both, with an option also to line up the charts along their top or left edges. This is the answer to many questions in the online forums and in my crowded inbox.

Top of Page


Label Last Point

This zipped Excel file contains a handy little utility that labels the last point in each series of a chart with the name (legend entry) of that series. Convenient for labeling your charts.

Top of Page


Fix Chart Font Scaling

Hate the way Excel mucks up your chart font sizes when you resize the chart?
So do I, and here's how I counteract the default font scaling.

Top of Page


Make Gridlines Square.

A common question people ask is "How do I format my chart so its gridlines make a square pattern?" Excel has no setting that forces equally spaced horizontal and vertical gridlines or horizontal and vertical axis ticks, but you can achieve this effect using VBA. Below is a chart after making the appropriate scale adjustment.

Top of Page


Get Information about a Point on a Chart Sheet (simple version).

Put code from this zipped workbook into the code module of a chart sheet, and clicking on a point will provide information about that point. Fairly basic.

Get Information about a Point in an Embedded Chart

Put this zipped workbook's modules into your workbook containing charts, embedded ones as well as chart sheets, and clicking on a point will provide information about that point. Fairly complex.

These two items are offered without much explanation for now. They are not well documented, maybe some day I'll get around to it.

Top of Page




Interactive Chart Creation.

Choose on-the-fly where you want your chart to be drawn, and where to find the data you want to plot.

Top of Page


Switch X and Y on an XY Chart

Ever get your chart all fixed up, then decide you want to swap the X and Y axes? Or switch the X and Y values of a series in the chart? Or both? This zipped Excel file can swap the X and Y on your chart.

This only works on XY Scatter Charts, not Line Charts, or Bar Charts, or any other kind of chart. So far it also only works on primary axes, not secondary axes. Eventually I will expand this utility's capabilities to include Line Charts, and Bar and Column Charts, and secondary axes. I have not yet built in error checking to assure you don't try to use this on the wrong style of chart. So please save your work before using the Switcher, and keep in mind these limitations.

Top of Page


Dynamic Control Chart.

This zipped Excel file draws a control chart from data within a dynamic range on the worksheet, adds lines for Mean, UCL, and LCL, and updates same as data evolves. Contains randomly generated values in this demo. Features include a chart axis rescaling algorithm which is simple but effective in limited testing, and code that formats a data point's marker based on its value. (Warning: incompletely documented.)

Top of Page


Delink Chart Data.

There are occasions when you may want to break the link between a chart and its underlying data. Maybe you copied the chart and pasted it into another workbook, and opening the other workbook brings up the dialog box asking whether you want to update the links to another workbook. This page describes ways you can make a copy of a chart that is not linked to the parent data.

Top of Page


Chart Size on your Menu.

These zipped add-ins show a simple way to find the dimensions of your chart. Select a chart, and the width and height appear right in the floating command bar. Not documented.

The Excel 97 version simply shows the chart dimensions in inches.

The version for Excel 2000 and later shows the chart dimensions in units you select.

Top of Page


Change Series Formulas.

Ever make a copy of a chart, and all you want is do is change the worksheet containing the source data? Or change the X values of all series from column A to column B? The series formula is a simple text string, but there's no Search and Replace feature in Excel that can access these formulas. But you can use some very simple VBA code to make wholesale changes to chart series formulas.

The utility was upgraded on 1 August 2007 to avoid a VBA error that occurs when a defined name is used for the X values in the series formula.

Top of Page


Link Chart Axis Scale Parameters to Values in Cells.

Excel offers two ways to scale chart axes. You can let Excel scale the axes automatically; when the charted values change, Excel updates the scales the way it thinks they fit best. Or you can manually adjust the axis scales; when the charted values change, you must manually readjust the scales. Wouldn't it be great to be able to link the axis scale parameters to values or, even better, formulas in the worksheet? This page shows how to use VBA to accomplish this.

Top of Page


Bubble Charts in Microsoft Excel.

Bubble charts are one way to show three dimensions of data in a flat 2D chart. In addition to the points being located on a grid according to X and Y values, the size of the marker is proportional to a third set of values. Making a bubble chart is easy: select a data range with three columns (or rows) of data, run the chart wizard, and choose one of the bubble chart types.

Top of Page


Line and Fill Effects in Excel Charts Using VBA.

Excel charts offer a wide variety of formats, but you can use Excel's drawing tools to enable even more formatting choices. It's possible to draw shapes on the chart to produce these formats, using the polygon drawing tool. This allows more line formats, by enabling more choices of line thickness and by making it easier to read dashed lines. More fill possibilities are made possible than merely filling below a series, as in an area chart: the fill can go below or to the side of the series, and in fact, an enclosed region in the chart can be filled. The fill can be made transparent too, allowing gridlines to show through the shape.


This article presents VBA procedures that automate the polygon drawing tool, and gives hints about the kinds of formatting which may be achieved. A sample procedure has been recently added to show how to use this technique for charts that have multiple series.

Top of Page


Line and Fill Effects in Excel Radar Charts Using VBA.

Excel charts offer a wide variety of formats, but you can use Excel's drawing tools to enable even more formatting choices. Line and Fill Effects in Excel Charts Using VBA shows how to draw shapes on an XY chart to produce these formats, using the polygon drawing tool. This allows more line formats, by enabling more choices of line thickness and by making it easier to read dashed lines. More fill possibilities are made possible, including transparent fills, allowing gridlines and series to show through the shape.

This article extends VBA polygon drawing procedures to radar charts.

Top of Page

 

 

Page copy protected against web site content infringement by Copyscape

 

Peltier Tech Chart Utilities for Excel Peltier Tech Waterfall Chart Utility Peltier Tech Box and Whisker Chart Utility Peltier Tech Cluster-Stack Chart Utility Peltier Tech Panel Chart Utility Peltier Tech Marimekko Chart Utility Peltier Tech Dot Plot Utility Peltier Tech Cascade Chart Utility

 

Create Excel dashboards quickly with Plug-N-Play reports.


Peltier Technical Services, Inc.

Excel Chart Add-Ins | Training | Charts and Tutorials | PTS Blog

Peltier Technical Services, Inc., Copyright © 2012. All rights reserved.
You may link to this article or portions of it on your site, but copying is prohibited without permission of Peltier Technical Services.

Microsoft Most Valuable Professional

Microsoft Most Valuable Professional

My MVP Profile