ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   How can I change the position/format for all data labels in a ser. (https://www.excelbanter.com/charts-charting-excel/90-how-can-i-change-position-format-all-data-labels-ser.html)

PearlBeast

How can I change the position/format for all data labels in a ser.
 


Andy Pope

Hi,

Double click a data label. The format dialog should then allow you to
format the labels, its font attributes and alignment.

Cheers
Andy

PearlBeast wrote:

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

Jon Peltier

Rob Bovey's Chart Labeler also has a feature to Move all labels for a series en
masse. It's a free download, easy to install and use:

http://appspro.com

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Andy Pope wrote:

Hi,

Double click a data label. The format dialog should then allow you to
format the labels, its font attributes and alignment.

Cheers
Andy

PearlBeast wrote:



John Mansfield

Another option via code . . .

Sub MoveLabels()

Application.ScreenUpdating = False

On Error Resume Next

Dim A As Integer 'Start Value
Dim B As Integer 'End Value
Dim C As Integer 'Increment Value
Dim D As Integer 'Vertical Move
Dim E As Integer 'Horizontal Move
Dim F As Integer
Dim G As Integer

Set Cht = ActiveChart

Set Srs1 = ActiveChart.SeriesCollection(1)

Set Pts1 = Srs1.Points

A = 1 ' Start Value
B = 6 ' End value
C = 1 ' Increment Value
D = 10 ' Vertical Move
E = 10 ' Horizontal Move

Do Until A B

'Sets the label font size
Srs1.Points(A).DataLabel.Font.Size = 10
'Sets the label number format
Srs1.Points(A).DataLabel.NumberFormat = "#,##0"

F = Srs1.Points(A).DataLabel.Top
Srs1.Points(A).DataLabel.Top = F + D

G = Srs1.Points(A).DataLabel.Left
Srs1.Points(A).DataLabel.Left = G + E

A = A + C

Loop

End Sub


"Jon Peltier" wrote:

Rob Bovey's Chart Labeler also has a feature to Move all labels for a series en
masse. It's a free download, easy to install and use:

http://appspro.com

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Andy Pope wrote:

Hi,

Double click a data label. The format dialog should then allow you to
format the labels, its font attributes and alignment.

Cheers
Andy

PearlBeast wrote:





All times are GMT +1. The time now is 07:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com