Pie chart labels not updating

Rated 4.52/5 based on 782 customer reviews

If th text in one of the cells changes, the corresponding label will not update. If the text in one of the cells changes, the corresponding label updates to show the new text.

Select an individual label (two single clicks as shown above, so the label is selected but the cursor is not in the label text), type an equals sign in the formula bar, click on the cell containing the label you want, and press Enter. Brilliant Excel jockey and former MVP Rob Bovey has written a Chart Labeler add-in, which allows you to assign labels from a worksheet range to the points in a chart.

Type the text you want to display in the label, and press the Enter key. This could get tedious, and you run the risk of typing the wrong text for the wrong label (I initially typed “alpha” for the label above, and had to redo my screenshot).

One thing that makes this approach unsophisticated is that the typed labels are not dynamic. This could get tedious, but at least the labels are dynamic.

Sub Add Labels From User Selected Range() Dim srs As Series, rng As Range, lbl As Data Label Dim i Lbl As Long, n Lbls As Long If Not Active Chart Is Nothing Then If Active Chart. Count = 1 Then Select Case Type Name(Selection) Case "Series" Set srs = Selection Case "Point" Set srs = Selection. The code then adds a label to the series point by point, linking the label to the appropriate cell.

Sub Add Labels From Range Next To YValues() Dim srs As Series, rng As Range, lbl As Data Label Dim i Lbl As Long, n Lbls As Long Dim s Fmla As String, s Temp As String, v Fmla As Variant If Not Active Chart Is Nothing Then If Active Chart. Count = 1 Then Select Case Type Name(Selection) Case "Series" Set srs = Selection Case "Point" Set srs = Selection.

It asks the user to select a range using an Input Box, and if the user doesn’t cancel it adds a label to the series point by point, linking the label to the appropriate cell. It doesn’t bother the user, instead the routine parses the series formula to find the range containing the Y values, and if this is a valid range, it finds the next column or row, depending on the orientation of the Y values range. Parent End Select End If If Not srs Is Nothing Then s Fmla = srs.

These are quick and dirty, because sometimes that’s all that you need.

Also, writing your own code allows you to streamline your workflow according to your specific requirements.

Often you want to add custom data labels to your chart.

The chart below uses labels from a column of data next to the plotted values.

Leave a Reply