Error Bar Ideosyncrasy

After using Excel 2007 for a while, getting used to the idea that everything had changed and we weren’t going back to 2003 ever again, I started fooling around with charts and chart elements. I began to find lots of little changes, most of them actually good ones, even if they were implemented in a funny way (at least until service packs and Excel 2010 cleaned up things).

Anyone who used my first charting utility knows things ain’t always done right the first time, and mine were tiny bits of software. I can’t imagine Microsoft’s task trying to coordinate thousands of developers and a bazillian lines of code.

One of the neat changes I discovered was that error bars were now treated as AutoShape lines, just like any lines in any shapes in Office. This means you had a lot of formatting options available to you, including nice embellishments like arrowheads on the ends of the error bar line segments. Then I forgot about it until a colleague brought it up recently.

To show this nice formatting, let’s look at a simple line chart with simple error bars. For clarity, and to avoid spoiling the story before I’m ready to tell it, I’ll start with positive error bars only.

Simple Line Chart with Simple Error Bars

Select the error bars and click Ctrl+1 (numeral one) to open the Format Error Bars task pane. In the main tab (below the bar chart icon, shown below left) change End Style from Cap to No Cap. Then on the formatting tab (below the paint can icon) check out the Begin and End Arrow Types.

This is the Format Error Bars task pane in Excel 2013; the Format Error Bars dialog in Excel 2007 and 2010 is substantially the same.

Format Error Bar Dialog

The error bar begins at the point, right? And ends at the, uh, end of the error bar, right? At least that’s what seems to make sense. So let’s pick a nice big round ball for the Begin Arrow Type.

Balls at Beginning of Error Bars

And let’s pick a nice big old arrow for the End Arrow Type. I’ve chosen the largest size for both ends of the error bar.

Arrowheads at End of Error Bars

And here’s our line chart with error bars, where the markers of the line chart could be replaced by the balls at the beginning of the error bars, and the arrows point away from the line.

Simple Line Chart with Fancy Ball and Arrowhead Error Bars

This is a very nice embellishment. I’ve used it in several projects already, and shown it to many people.

Anyway, back to the beginning of the story: the message from my colleague was that Excel 2010 and 2013 seem to define the beginnings and ends of the error bars differently.

Well, for positive error bars, Excel 2007, 2010, and 2013 all look the same.

Simple Line Chart with Simple Error Bars

But if we look at negative error bars, only Excel 2013 shows them beginning at the points and ending at the ends of the error bars, pointing downward. Excel 2007 and 2010 show the balls at the ends of the error bars and the arrowheads at the points, pointing upward. That’s bizarre.

Simple Line Chart with Simple Error Bars

Even more bizarre, if the error bars go both ways, only Excel 2013 has symmetric arrows. Excel 2010 shows both sets of arrows pointing upward, the negative ones toward the points, the positive ones away from the points. And Excel 2007 only has one set of arrows, beginning at the end of the negative error bars, ending at the ends of the positive error bars. Though if you had to, you could just pretend the end was the beginning and vice versa. Whatevs.

Simple Line Chart with Simple Error Bars

Excel 2007’s charting infrastructure was finished quickly at the end of the development cycle, so a few glitches weren’t ironed out of the final product. Excel 2010 fixed a lot of inconsistencies in Excel 2007’s charts, but these error bars show that not everything was totally fixed. In Excel 2007 or 2010 you could fake it with a second, hidden plotted series, and format two sets of error bars so they looked right. Excel 2013 has gotten the error bars working nicely, though.

Peltier Tech Chart Utility

Pivot Tables in Microsoft Excel: Links

This introduction has been contributed by Debra Dalgleish, Excel MVP. 
Contextures, Copyright © 2014. All rights reserved.
Debra Dalgleish, Excel MVP since 2001, is the author of three books on pivot tables, published by Apress. She shares Excel tips, tutorials, and videos on her websites, and

Web Sites

Peltier Tech Blog – Pivot Table Resources – a listing of posts on this blog, covering many aspects of pivot tables in Microsoft Excel, including:

Debra Dalgleish’s Excel Tutorials and Videos - which includes these pages of Pivot Table-related topics:

Microsoft – Overview of PivotTable and PivotChart reports
Good introduction to Pivot Tables.

Microsoft – 25 Easy PivotTable Reports
Sample file to download, and on-line instructions

Microsoft – Create a Pivot Table to Analyze Worksheet Data
Basic steps, and links to other articles

Chandoo – Excel Pivot Table Tutorial
Chandoo gives a good overview of pivot tables, with helpful tips and links.

Microsoft Support Articles

Calculated field returns incorrect grand total in Excel (211470)
In a PivotTable, Microsoft Excel may calculate an incorrect grand total for a calculated field.

Pivot Table Uses COUNT Instead of SUM with Blank Cells (110599)
Microsoft Excel automatically uses the SUM function for numeric data and the COUNT function for non-numeric data

How to create a dynamic defined range in an Excel worksheet (830287)
Create a named range that extends to include new information

GETPIVOTDATA formula is automatically created (287736)
When you try to create a simple cell link formula that refers to a cell in the data area of a PivotTable in Microsoft Excel, a GETPIVOTDATA formula is automatically created instead.

You cannot create a PivotTable in Excel 2013 when field names in a source range contain similar characters (2756731)
The data model cannot differentiate between the similar characters.

Pivot Table Books

Here are a few books about pivot tables, available from Amazon and elsewhere. I’ve selected these books because I know the authors and I’ve used the books, so I can vouch for their quality. Disclosure: if you purchase one of these books using my link, I’ll get a teeny commission.

Beginning PivotTables in Excel 2007: From Novice to Professional

Microsoft Excel Most Valuable Professional Debra Dalgleish explains what PivotTables are, how you can benefit from using them, how to create them and modify them, and how to use their enhanced features. Using a Pivot Table in Microsoft Excel 2007 is a quick and exciting way to slice and dice a large amount of data. Debra carefully explains the benefits of using Pivot Tables for fast data analysis, provides a step-by-step approach to those new to Pivot Tables, and offers tips and tricks that cannot be found elsewhere.

Excel Pivot Tables Recipe Book: A Problem-Solution Approach

Debra Dalgleish, Microsoft Excel Most Valuable Professional since 2001, and an expert and trainer in Microsoft Excel, brings together a one-stop resource for anyone curious about representing, analyzing, and using their data with PivotTables and PivotCharts. Debra presents tips and techniques in this collection of recipes that can’t be found in Excel’s Help section, while carefully explaining the most confusing features of PivotTables to help you realize their powerful potential.

Excel 2013 Pivot Table Data Crunching (MrExcel Library)

This book will help you leverage all the amazing flexibility and analytical power of Pivot Tables. You will learn how to generate complex pivot reports complete with drill-down capabilities and accompanying charts. Then you’ll discover how to build a comprehensive, dynamic pivot table reporting system for any business task or function. Microsoft Excel Most Valuable Professionals Bill Jelen and Mike Alexander include step-by-step instructions, real-world case studies, plus complete and easy recipes for solving your most common business analysis problems.

Peltier Tech Chart Utility

Using Pivot Tables in Microsoft Excel

This introduction has been contributed by Debra Dalgleish, Excel MVP.
Contextures, Copyright © 2014. All rights reserved.
Debra Dalgleish, Excel MVP since 2001, is the author of three books on pivot tables, published by Apress. She shares Excel tips, tutorials, and videos on her websites, and

What is a Pivot Table?

A pivot table creates an interactive summary from many records.

For example, you may have hundreds of invoice entries in a list on your worksheet.

A pivot table can quickly total the invoices by customer, product or date.

Pivot Table Data

Before you create a Pivot Table or Pivot Chart, organize your data in a table that Excel can understand.

  1. Use Headings: As in this example, the first row must have headings. Use a different heading for each column.
  2. Keep It Together: Keep all the data together — don’t include any completely blank rows or columns in the table.
  3. Isolate It: Leave at least one blank row and one blank column between the data table and any other information on the worksheet.
  4. Create a Named Table: To make it easy to maintain your pivot table, and ensure that new data is included when you update, format the source data as a Named Table.

Create a Pivot Table

Many web sites give instructions for creating a pivot table. (See Pivot Table and Pivot Chart Links).

Create a blank pivot table by clicking a command on the Ribbon.

Click another command and Excel will even recommend a few layouts, based on your data.

Excel shows a preview of a few recommended pivot tables.

After the pivot table is built, Excel displays a task pane summarizing the data in the pivot table.

You can easily rearrange the information in the pivot table by checking the boxes and dragging the buttons to a new position.

Pivot Table Links

The following links on the Contextures web site help with some of the common issues and questions about pivot tables:

These are the most popular pivot table articles on the Contextures web site:

More Pivot Table Resources

Peltier Tech Chart Utility

Swimmer Plots in Excel

A reader of the Peltier Tech Blog asked me about Swimmer Plots. The first chart below is taken from “Swimmer Plot: Tell a Graphical Story of Your Time to Response Data Using PROC SGPLOT (pdf)“, by Stacey Phillips, via Swimmer Plot by Sanjay Matange on the Graphically Speaking SAS blog.

The swimmer chart below is an attempt to show the responses of several patients to drug treatments. Each horizontal stripe represent a patient’s history, color coded by the stage of the patient’s disease at the onset of treatment at month zero. Different events are plotted within each patient’s stripe. The term “Swimmer Plot” comes from the resemblance to lanes in a swimming pool, where swimmers (events) must stay in their own lanes.

Swimmer Plot

The paper cited above gives a detailed protocol and related code for constructing this chart in a statistical graphics package that I’ve never used. The Peltier Tech blog reader wondered if there was a way to build this chart in Excel without having to draw shapes on the chart and locating them inexactly with the mouse.

I’m never one to pass up a reasonable challenge in Excel charting, so I decided to give it a try. This is the kind of chart that can probably be adapted to a variety of uses, and it’s a great way to help people learn how to think outside their usual approaches, to push Excel beyond its supposed limits.

The Approach

One’s first thought might be to build a horizontal bar chart, then use XY scatter data series for the various symbols on the bars. The arrows would have to be shapes drawn on the chart. This mixture of bar and XY chart types causes problems when trying to synchronize axes and aligning markers with bars.

On second thought, though, this chart can be built using XY chart series exclusively. The thick horizontal bands can be made from thick-lined error bars. The arrows at the end of certain bands can also be made using error bars. The only shape needed is for the arrow in the legend.

This entire protocol is one of my longest ever, but it will be worth the ride.

Swimmer Plot Data

All of the data in the chart conforms to two axes. The horizontal (X) axis shows months, either the total duration of the patient’s history or the treatment events. The vertical (Y) axis is simply the index of the subjects (patients): subject 1 is the bottom band in the chart and its associated symbols, subject 2 is the second band and symbols, on up to subject 10 at the top of the chart. In this example, the X axis data has been color coded blue and the Y axis data orange.

This first set of data shows the endpoints of the patient histories. Patients 10 and 3 have month data (18.2 and 9.5 months) in the Stage 1 column, patients 9, 5, and 1 in the Stage 2 column, etc. I optically extracted this data from the chart above before I realized it was included in the pdf article. I’ll take responsibility for any transcription errors.

Swimmer Plot Main Data

Each set of markers in the chart need X (month) and Y (subject) data. The ranges below show data for the four sets of markers and the set of arrows that will be added to the chart.

Swimmer Plot Supplemental Data

Building the Chart: The Swimmer Lanes

The first block of data is used to create the bands in the swimmer chart. Excel’s usual arrangement is to have X values in the first column of the data range and one or more columns of Y values to the right. Our data has Y values in the last column, and several columns of X values to the left. So putting this data into the chart will take a few steps.

Select the Disease Stage 1 column of data, and hold down the Ctrl key to select the unlabeled column of subject indices, then insert an XY Scatter chart. Most of the Disease Stage 1 column is blank, so only two points appear.

Swimmer Plot Construction

I’ve already stretched the chart above to its final size, and I’ve scaled the axes using their ultimate scale parameters. The X axis extends to -1 to allow room for the Durable Responder indicators.

The chart below has had the tick marks and labels removed from the vertical (Y) axis. Note that I’m leaving out chart and axis titles and other annotations to avoid distractions.

Swimmer Plot Construction

Now the next three Disease Stage series must be added. You can do this in at least two ways. My favorite is to select and copy the data, using the Ctrl key if needed to select discontiguous regions, then select the chart and use Paste Special from the Home tab. Use the settings on the screen shot below: add data as new series, values in columns, series names in first row, categories in first column.

Paste Special Dialog

Alternatively, right click on the chart and choose Edit Data from the popup menu or click on Edit Data on the Chart Tools > Design tab to open the Select Data Source dialog. Click the Add button, then populate the Edit Series dialog with the ranges containing the data for the new series.

Select Data Dialog

Repeat until all of the Disease Stages are potted on the chart.

Swimmer Plot Construction

I’ve formatted the markers with the desired formatting for the swimmer plot lanes. Basically I picked four colors that were a bit darker than in the original chart from the cited paper, and lightened them by applying 30% transparency.

Shameless Plug

Previously I noted that the Disease Stage data for this chart was listed with several columns of X data and one column of (shared) Y data. This differs from Excel’s assumption that the data consists of one column of (shared) X data and several columns of Y data. Because of this data arrangement, the chart has to be created tediously, one series at a time.

Such tedium isn’t necessary, however. Using my Peltier Tech Chart Utility, I was able to use the Quick XY Charts feature to create the chart with all of these series in one shot.

Peltier Tech Chart Utility - Quick XY Charts

I selected the data, clicked on the Quick Charts button on the Peltier Tech ribbon, selected Series in Columns and the X-X-Y data layout (highlighted above). The result was this XY Scatter chart, which requires much less manipulation to generate our Swimmer Plot.

Quick XY Swimmer Chart

The series need to be formatted: square markers with the colors and transparency described above and no lines. Also the legend should be moved to the right of the chart.

Back to the Lanes

We’ll use thick error bars as the swimmer lanes. Select one series and add error bars using the “+” icon in Excel 2013…

Add Error Bars in Excel 2013

… or using the Chart Tools > Layout tab in Excel 2007 and 2010.

Add Error Bars in Excel 2007-2010

Excel adds horizontal and vertical error bars to an XY series.

Swimmer Plot Construction

Select the vertical error bars, and click the Delete key. Then select the horizontal error bars and press Ctrl+1 (numeral one) to open the format dialog or task pane. This is the Excel 2013 task pane, but the Excel 2007-2010 format dialog is essentially the same.

Format Error Bars

Select the options shown above: Minus direction only, No End Caps, and Percentage using 100%. The chart below shows Minus 100% error bars with End Caps not removed.

Swimmer Plot Construction

Format the error bar lines with the colors used for the markers, and select a thickness for the bars which will be suitable for the chart.

Format Error Bar Lines

Hey look, bars without a bar chart.

Swimmer Plot Construction

Add and format error bars for the rest of the Disease Stage series.

Swimmer Plot Construction

We need to remove the markers from the chart without removing them from the legend. We have to trick Excel into thinking each series in the legend is formatted with markers while each point is formatted without.Click once to select a series, then again to select a marker, then click Ctrl+1 to open the formatting dialog or task pane for the single point, and choose the No Marker option. The marker from the top Stage 1 point has been removed in this chart:

Swimmer Plot Construction

Repeat; all Stage 1 markers are hidden below:

Swimmer Plot Construction

And repeat for all of the markers:

Swimmer Plot Construction

Add the Treatment Events

Several sets of XY markers are now added. You can copy the data,select the chart, and use Paste Special as described above, or you can use the Select Data Source dialog.

Here is the chart with Complete Response Start markers added to the lanes, with the markers formatted as red triangles like those in the example chart.

Swimmer Plot Construction

Now Partial Response Start points have been added.

Swimmer Plot Construction

Finally, Response Episode End has been added.

Swimmer Plot Construction

Add the Continuation Arrows

The continued Response data is displayed not as markers but as arrows, indicating that the activity extends further to the right than the lanes. This is easy to do with an XY series that shows no markers but instead has error bars with arrowheads on the ends of the bars.

First, add the data as a new series with no markers and a heavy black line. The heavy dark line will somewhat resemble the arrows in the legend.

Swimmer Plot Construction

Add error bars (use the same method as for the error bar lanes above).

Swimmer Plot Construction

Select and delete the vertical error bars as before, then format the horizontal error bars as follows: Plus direction only, No End Caps, and a Fixed Value of 1 (e.g., one month along the X axis).

Format Error Bars

Then format the error bar lines as medium thickness black lines with the appropriate arrowhead type and size. The “begin” arrow points toward the markers, the “end” arrow points away.

Format Error Bar Arrows

The result is a set of arrows extending beyond some of the swimming lanes.

Swimmer Plot Construction

Now we need to remove the black lines from the chart without removing them from the legend. In the same way we hid the unwanted markers from the chart but kept them in the legend to denote the lanes, we can select the entire series with one click, then select one individual line segment, then press Ctrl+1 and format this segment as No Line.

Here the first segment has been hidden.

Swimmer Plot Construction

Now the second segment is hidden.

Swimmer Plot Construction

A few clicks later, all traces of the line are gone.

Swimmer Plot Construction

Add Durable Responder Indicators

Finally, the Durable Responder data is added to the chart. The -0.25 X values place the markers just left of the vertical axis and the start of the lanes.

Swimmer Plot Construction

Final Adjustments

A couple small adjustments improve the look of the chart. First, the vertical axis scale of 0 to 11 leaves rather wide margins above and below the data. If the axis scale min and max are changed to 0.25 and 10.75, this margin is slightly reduced.

The -1 horizontal axis minimum is strange, but changing the horizontal axis number format to 0;;0 hides the negative value.

Swimmer Plot Construction

Finally, if the thick black line is not acceptable as a legend marker for the Continued Response arrows, you can use an arrow for the legend entry.

First, use a white line instead of the black line for the series lines, then hide each segment of this line as you hid the black line segments; this places a white line in the legend. If you had formatted the series as No Line, the line in the legend would not be there, and the markers would be squeezed right up against the legend labels, which does not leave room for a centered arrow.

Then insert an arrow from the Insert Shapes gallery on the ribbon. Format it as a heavy line with the matching arrow appearance. Drag it into the desired position in front of the Continued Response label.

Swimmer Plot Construction

Wrap Up

Charts like this swimmer plot, the related Gantt chart, and other charts were difficult to make in Excel 2003 and earlier versions of Excel. You needed to combine stacked bar chart and XY scatter chart data in the same chart. This required special effort to ;ine up the XY markers with the bars, and keep them aligned.

Excel 2007 introduced much more flexibility in formatting of lines, so you can make thick bars with any line segments, such as series connecting lines and error bars. Swimmer plots and Gantt charts are much easier to make and maintain, because markers and bars are easy to keep in place using a single set of axes.

Peltier Tech Chart Utility

Peltier Tech Advanced Chart Utilities for Mac

The Peltier Tech Advanced Chart Utilities for Mac is here.

Over the past month a month, I’ve converted the Advanced Edition of the Peltier Tech Chart Utility so that it works on a Mac as well as in Windows. I’m pleased that every feature from the Windows version has made it into the Mac version, though some options are not available. This is due mostly to the inconsistencies between Office on the Mac and Office in Windows, such as the unavailability of modeless forms and the reduced selection of Paste Special options in MacOffice. A few differences relate to incompatibilities between the two platforms themselves, such as the strange special keys and special key behavior on the Mac (somehow the Mac’s Cmd-Ctrl-Opt-Shift keys provide less functionality than Windows’ Ctrl-Alt-Shift). The lack of a customizable ribbon in Mac Office means the user experience is less fulfilling than in Windows.

 The Charts

The Advanced Edition for the Mac has all the custom charts as the Standard Version for the Mac and for Windows: Waterfall, Box Plot, Marimekko, Cluster-Stack, etc., and all the new charts introduced last month in the Advanced Edition for Windows: More Waterfalls, Diverging Stacked Bar, Paretos and Histograms, and more.

In addition to the charts shown here, any new custom charts developed by Peltier Tech will become part of the Advanced Edition. If you hear from the Peltier Tech twitter feed, the Peltier Tech Facebook page, or the Peltier Tech Blog that a new chart has been added (or a bug has been fixed), email for a new download link so you can keep your license up-to-date.

Custom Chart Comparison of All Versions and Editions of the Peltier Tech Chart Utility

The Features

In addition to the helpful features of the Standard Edition, such as Edit Series Formulas, Copy and Paste Series Formats, Label Last Point, and Export Chart as Image File, the Advanced Edition adds such items as Export Range as Image File, Export Charts to PowerPoint and Word, Switch X and Y, and a simpler Error Bar Manager.

In addition to the features shown below, any new functionality developed by Peltier Tech will be added to the Advanced Edition. If you hear via the Peltier Tech twitter feed or the Peltier Tech Blog that a new feature has been added (or a bug has been fixed), email for a new download link so you can keep your utility current.

Feature Comparison of All Versions and Editions of the Peltier Tech Chart Utility

The Details

The Advanced Edition for the Mac runs on the latest updates of Excel 2011 for the Mac, and the relevant versions of the Mac OS that supports Excel 2011.

Detail Comparison of All Versions and Editions of the Peltier Tech Chart Utility

The Deals

The Advanced Edition retails for $99, just slightly more than the $79 for the Standard Edition. But there are some great introductory deals:

  • If you purchase a license for the Advanced Edition between July 8 and July 15, you get it for the same $79 price as the Standard Edition.
  • If you already have a license for the Standard Edition, send me an email and I will send you a coupon code for a free upgrade to the Advanced Edition.
    • In the future, you can upgrade from the Standard to Advanced Edition for only the $20 difference in price.
  • If you have licensed one of the earlier Waterfall or Cluster-Stack Utilities for the Mac, email me and I’ll send a coupon for half off the $79 introductory price.
    • In the future, if you have licensed any of the older utilities, email me for a half-price coupon.
  • When Microsoft releases the long-awaited Excel 2014 for Mac, the Peltier Tech Utility for Mac will be updated, and current licensees will be able to upgrade for no charge.
  • When Microsoft releases Excel 16 for Windows (probably a/k/a Excel 2016 or 2017), the Peltier Tech Chart Utility will be upgraded, and current licensees will as always be able to license the upgrade for half price.

Visit the Peltier Tech Chart Utilities page to take advantage of these special offers.

Peltier Tech Chart Utility

Peltier Tech Chart Utility


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