Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 7
Default Pivot Table - Change / Format Legend Names

I created a pivot table graph. I have a ranking field that appear
concatenated like
{color} 1 - Confused
{color} 2 - Ugh

I need to change to
{color} Confused
{color} Ugh

Using this code below, I can format the string but the Name is not
updating

Dim m as Integer
Dim strmk As String
Dim iLen As Integer

For m = 1 To ActiveChart.SeriesCollection.Count
iLen = Len(ActiveChart.SeriesCollection(m).Name)
strmk = (Mid(ActiveChart.SeriesCollection(m).Name, 4,
iLen))
ActiveChart.SeriesCollection(m).Name = "bob"
Next m
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1,180
Default Pivot Table - Change / Format Legend Names

Excel 2007 PivotTable, PivotChart
Change the PT data headers instead:
Sub NameChange()
Dim s As String
Dim n As Integer
With ActiveSheet.PivotTables(1)
For n = 1 To .DataFields.Count
s = .DataFields(n).Name
s = Replace(s, "Sum of ", "_")
..DataFields(n).Name = s
Next n
End With
End Sub

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
Mass format change of 'data' in pivot table DME777 Excel Discussion (Misc queries) 1 September 18th 09 07:19 PM
Pivot Table Chart Legend Chiccada Charts and Charting in Excel 2 September 5th 09 05:06 AM
DATE FORMAT CHANGE FROM EXCEL WORKSHEET TO PIVOT TABLE Wendy Excel Discussion (Misc queries) 0 November 19th 08 12:54 AM
Change Names of Legend Elaine Charts and Charting in Excel 5 August 17th 08 04:00 AM
pivot table format change mhutch71 Excel Discussion (Misc queries) 1 August 23rd 05 01:29 PM


All times are GMT +1. The time now is 03:10 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"