'Change format of all data labels of a single series at once

I have an Excel 2010 chart, with several series. I have added data labels to one of the series. I want to change the font size of all labels of that series at once. Can it be done?

Note that if the contents of data labels are combinations of the three standard options in the Format Data Labels dialog ("Series Name", "X Value", or "Y Value"), I simply change the font size in the ribbon and it works. But if data labels contain cell references (i.e., formulas), I could only change the font size of one label at a time.

I guess a macro would help. I tried something a while ago, and faced a sequence of problems (do not remember exactly which). Anyone knows of a shorter/alternative solution?



Solution 1:[1]

  1. It appears I found the cause. Referring to the figure, whenever any of the cells referred to by the data labels is empty (e.g., deleting the contents of D4), I cannot change the font size. If I reinstate D4, I can change the font size again. This is reproducible for the simple worksheet/chart of the figure. According to this,
    Workaround 1: Fill up all empty cells referred to. Change the format of labels. Remove added contents.
    Workaround 2: Change to a dummy range for the data labels, which has no empty cells. Change the format of labels. Switch back to your intended range. This might require The XY Chart Labeler, an excellent add-in by Rob Bovey.
    This does not always work (there are cases where one cannot change font even with all non-empty cells), so there should be another possible cause for the problem (besides the one reported).

enter image description here

  1. A workaround: For the workbook, Save As... (you can even use the same workbook name). The problem goes away. But if you close the file and open it again, the problem reappears. Most of the times it works.

  2. A workaround (found prior to #1): A very poor solution, but which possibly saves quite a few keystrokes/mouse clicks in many cases. Select the whole chart, and change the font size in the ribbon. It will change all text. Then recover the font size of all other text but the data labels. It won't work in charts with more than one series with such data labels, if you want them to have different sizes!

Solution 2:[2]

A quick way to solve this is to:

  1. Go to the chart and left mouse click on the 'data series' you want to edit.
  2. Click anywhere in formula bar above. Don't change anything.
  3. Click the 'tick icon' just to the left of the formula bar.
  4. Go straight back to the same data series and right mouse click, and choose add data labels

This has worked in Excel 2016. Purely by luck I worked this out saving a great deal of time and frustration.

Screenshot example

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Nic