-
Well this is because code compares the values of two datapoints' label text and my sloppy code was trying to cast the string "4.42%" to a single when the charts were in percent 
So to correct this horrible oversight, when we start the loop for each series, we can save its datalabel number format and change it to general so we can do our comparison with the raw number [VBA]With srs
.HasDataLabels = True
.DataLabels.Type = xlValue
OldNumberFormat = .DataLabels.NumberFormat
.DataLabels.NumberFormat = "General"
End With[/VBA]then reapply the number format.[VBA]End If
Next pi
srs.DataLabels.NumberFormat = OldNumberFormat
Next srs[/VBA]That way it'll work on all charts.
K :-)

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules