Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2
Default Changing font style/size/color/etc for multiple series in a chart?

I have a stacked bar chart (but note applies to all charts) that I have added
data labels to in Excel 2007. However, the data labels are the wrong font
size and color.

When I go to format data labels in the "Labels" section of the Chart
Tools/Layout ribbon, there is no apparent option to change font. I can right
click on a single series and change it, but doing that for every series in a
complex chart seems ludicrous.

Is there any way to change the font for multiple series in one step?
The same holds true for changing the number format or any other
characteristic for multiple series at once (the format data labels still only
applies to one series or label at a time - very painful).

Thanks for any help!

  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 5,600
Default Changing font style/size/color/etc for multiple series in a chart?

To reformat datalabels in all series in one go you'll need a macro, adapt
the following to your needs (revert back if not sure how)

Sub DataLabelFont()
Dim cht As Chart
Dim sr As Series
Dim dls As DataLabels

On Error Resume Next
Set cht = ActiveChart
If cht Is Nothing Then
MsgBox "No chart is selected"
Exit Sub
Else
If MsgBox("reformat datalabels..." & vbCr & "*no undo*" _
, vbOKCancel) < vbOK Then
Exit Sub
End If
End If
On Error GoTo 0
For Each sr In cht.SeriesCollection
On Error Resume Next
Set dls = sr.DataLabels
On Error GoTo 0
If Not dls Is Nothing Then
dls.NumberFormat = "#,##0.000"
With dls.Font
.Bold = False
.Italic = False
.Size = 8
.Color = RGB(25, 25, 128)
End With
End If
Next

End Sub

Regards,
Peter T

"Hossdaddy" wrote in message
...
I have a stacked bar chart (but note applies to all charts) that I have
added
data labels to in Excel 2007. However, the data labels are the wrong font
size and color.

When I go to format data labels in the "Labels" section of the Chart
Tools/Layout ribbon, there is no apparent option to change font. I can
right
click on a single series and change it, but doing that for every series in
a
complex chart seems ludicrous.

Is there any way to change the font for multiple series in one step?
The same holds true for changing the number format or any other
characteristic for multiple series at once (the format data labels still
only
applies to one series or label at a time - very painful).

Thanks for any help!



  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2
Default Changing font style/size/color/etc for multiple series in a ch

Thanks, Peter, but I must confess I was hoping for a simpler solution that I
was just overlooking, as I am not a macro-master. I'll keep this in my back
pocket to try for a really complicated one, but for now, I may have to
maintain the brute force approach. Thanks for taking the time to reply. I
really appreciate it.

"Peter T" wrote:

To reformat datalabels in all series in one go you'll need a macro, adapt
the following to your needs (revert back if not sure how)

Sub DataLabelFont()
Dim cht As Chart
Dim sr As Series
Dim dls As DataLabels

On Error Resume Next
Set cht = ActiveChart
If cht Is Nothing Then
MsgBox "No chart is selected"
Exit Sub
Else
If MsgBox("reformat datalabels..." & vbCr & "*no undo*" _
, vbOKCancel) < vbOK Then
Exit Sub
End If
End If
On Error GoTo 0
For Each sr In cht.SeriesCollection
On Error Resume Next
Set dls = sr.DataLabels
On Error GoTo 0
If Not dls Is Nothing Then
dls.NumberFormat = "#,##0.000"
With dls.Font
.Bold = False
.Italic = False
.Size = 8
.Color = RGB(25, 25, 128)
End With
End If
Next

End Sub

Regards,
Peter T

"Hossdaddy" wrote in message
...
I have a stacked bar chart (but note applies to all charts) that I have
added
data labels to in Excel 2007. However, the data labels are the wrong font
size and color.

When I go to format data labels in the "Labels" section of the Chart
Tools/Layout ribbon, there is no apparent option to change font. I can
right
click on a single series and change it, but doing that for every series in
a
complex chart seems ludicrous.

Is there any way to change the font for multiple series in one step?
The same holds true for changing the number format or any other
characteristic for multiple series at once (the format data labels still
only
applies to one series or label at a time - very painful).

Thanks for any help!




  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 39
Default Changing font style/size/color/etc for multiple series in a ch

I have the same problem as Hossdaddy
is there any other/simpler solution that was suggested since then?
Vincent

"Hossdaddy" wrote:

Thanks, Peter, but I must confess I was hoping for a simpler solution that I
was just overlooking, as I am not a macro-master. I'll keep this in my back
pocket to try for a really complicated one, but for now, I may have to
maintain the brute force approach. Thanks for taking the time to reply. I
really appreciate it.

"Peter T" wrote:

To reformat datalabels in all series in one go you'll need a macro, adapt
the following to your needs (revert back if not sure how)

Sub DataLabelFont()
Dim cht As Chart
Dim sr As Series
Dim dls As DataLabels

On Error Resume Next
Set cht = ActiveChart
If cht Is Nothing Then
MsgBox "No chart is selected"
Exit Sub
Else
If MsgBox("reformat datalabels..." & vbCr & "*no undo*" _
, vbOKCancel) < vbOK Then
Exit Sub
End If
End If
On Error GoTo 0
For Each sr In cht.SeriesCollection
On Error Resume Next
Set dls = sr.DataLabels
On Error GoTo 0
If Not dls Is Nothing Then
dls.NumberFormat = "#,##0.000"
With dls.Font
.Bold = False
.Italic = False
.Size = 8
.Color = RGB(25, 25, 128)
End With
End If
Next

End Sub

Regards,
Peter T

"Hossdaddy" wrote in message
...
I have a stacked bar chart (but note applies to all charts) that I have
added
data labels to in Excel 2007. However, the data labels are the wrong font
size and color.

When I go to format data labels in the "Labels" section of the Chart
Tools/Layout ribbon, there is no apparent option to change font. I can
right
click on a single series and change it, but doing that for every series in
a
complex chart seems ludicrous.

Is there any way to change the font for multiple series in one step?
The same holds true for changing the number format or any other
characteristic for multiple series at once (the format data labels still
only
applies to one series or label at a time - very painful).

Thanks for any help!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save as dialogue box, changing font size/color Rick M Excel Discussion (Misc queries) 1 April 30th 09 08:12 PM
Combining Multiple-Color Data Series into One Bar Chart JSF Charts and Charting in Excel 0 September 24th 08 01:41 AM
Changing Font color based on font type or size John Excel Discussion (Misc queries) 2 February 7th 08 12:50 AM
Form CheckBox font size / style tikchye_oldLearner57 Excel Discussion (Misc queries) 2 March 15th 07 01:34 AM
changing font style in a complex worksheet function gvm Excel Worksheet Functions 6 August 3rd 05 01:29 AM


All times are GMT +1. The time now is 04:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"