Using Excel custom chart labels is a great way to create a more insightful chart without having to show a whole other series. Just take this chart below with custom labels showing the year on year % change:
Enter your email address below to download the sample workbook.
Custom Chart Labels Excel 2013
In Excel 2013 we can easily insert custom chart labels using the new ‘Value From Cells’ option found in the Label Options menu:
Unfortunately if you’re using Excel 2007 or 2010 you’re not so fortunate but fear not, I have a workaround.
Custom Chart Labels Excel 2010/2007
The Old Way:
I used to hijack the regular labels and replace them with links to cells containing the label I wanted, however there were three problems with this approach:
- They could only display numbers, which means I couldn’t do anything fancy like the up/down triangles in the chart above.
- It was tedious as they had to be linked one at a time and when you’ve got loads of labels….well, it gets boring fast.
- They didn’t dynamically update i.e. if the period of my chart changed I had to manually change my labels…double boring.
The workaround for this was to insert text boxes and link them to cells, however this also fell afoul of problems 2 and 3 above.
Bonus problem: aligning the text box labels wasn’t too bad if you wanted them along a straight line as you could just use the Alignment Tools, but if you want them staggered in line with the column height then you’ll be wasting valuable hours tediously moving boxes up and down. Yawn.
The New Improved Way:
Last week Karen asked me how to insert custom labels that dynamically update, so I spent a bit of time experimenting with the tools buried in the chart menus and figured out that I could hijack the horizontal category axis for my custom labels, and puff, just like that problems 1, 2, 3 and 4 are gone.
Here’s how: Set up your chart source data:
Take special note of columns D and E as these are required for the labels.
A brief word on the Max column: this column simply returns the MAX from columns B and C for each row. We use Max as a dummy series in our chart to dynamically position the labels just above the columns. Note: Excel 2013 onward also requires this step if you have more than one series you want to position your labels above.
Step 1: Select cells A26:D38 and insert a column Chart
Step 2: Select the Max series and plot it on the Secondary Axis: double click the Max series > Format Data Series > Secondary Axis:
Step 3: Insert labels on the Max series: right-click series > Add Data Labels:
Step 4: Change the horizontal category axis for the Max series: right-click > Select Data > select ‘Max’ from the Legend Entries and then click ‘Edit’ under ‘Horizontal Axis Labels’:
Select the Labels in cells E27:E38 and click OK (image below):
Don’t worry if the chart doesn’t look any different yet.
Step 5: Replace the default labels with your custom labels: right-click the labels > Format Data Labels:
From the ‘Label Contains’ list choose ‘Category Name’:
Step 6: hide the Max series columns by formatting them with ‘No fill’: double-click the Max columns in the chart to open the ‘Format Data Point’ dialog box and under the ‘Fill’ tab choose ‘No fill’:
Step 7: Tidy up the chart:
- Hide the secondary axis – double click it to open the Format Axis dialog box > Axis Options > Axis Labels, Major and Minor tick marks > set all to ‘None’:
- While in the Format Axis dialog box go to the ‘Line Colour’ tab > select No Line
- Move the legend to the bottom: double click the legend > legend position > Bottom
- Get rid of the gridlines – just select them and press the Delete key.
- Format the legend point for Max to pick up the value in cell E26: right-click the columns > Select Data > select Max from the Legend Series list > Edit:
In the Series name field click on cell E26 > click OK:
Celebrate! Your custom chart labels are complete:
Thanks to Karen for prompting me to discover this workaround. Although, I'm sure I'm not the first to use this technique, I've not stumbled upon it before.
If you liked this or know someone who could use it please click the buttons below to share it with your friends on LinkedIn, Google+, Facebook and Twitter.