Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 07-01-2009, 03:57 AM
hapachris hapachris is offline
Registered User
 
Join Date: 01 Jul 2009
Location: Tokyo
MS Office Version:Excel 2007
Posts: 3
hapachris is becoming part of the community
Category name in pivot chart

Please Register to Remove these Ads

I'm trying to change the name of the category name in a pivot chart.

I have pivot table where I summarize some values from a table. I than created a chart out of this pivot table. The chart type is a pie-of-pie chart.

The first pie consists of 2 values "true" and "false". The 2nd pie is a break-down pie of the "true" pie slice.
When the chart is generated, it shows "Others" in the 1st pie. But I want to change this name to "true".
How am I able to do it?
Any help would be appropriated and thanks in advance!


The outlined part is the part I want to change.

http://img4.imageshack.us/img4/5191/pic1qep.jpg
Reply With Quote
  #2  
Old 07-01-2009, 05:20 AM
Andy Pope's Avatar
Andy Pope Andy Pope is offline
Forum Guru
 
Join Date: 10 May 2004
Location: Essex, UK
MS Office Version:2003 & 2007 sp2
Posts: 7,223
Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding
Re: Category name in pivot chart

The text for the 'Other' data label is automatic.

You can however change the text either manually or with code.

Code:
Sub ChangeOthersDataLabel()
    
    Dim lngIndex As Long
    Dim strNewText As String
    
    strNewText = "My Label"
    With ActiveChart
        With .SeriesCollection(1)
            .DataLabels(.Points.Count).Text = strNewText
        End With
    End With
    
End Sub
__________________
Cheers
Andy
www.andypope.info
Reply With Quote
  #3  
Old 07-01-2009, 06:14 AM
hapachris hapachris is offline
Registered User
 
Join Date: 01 Jul 2009
Location: Tokyo
MS Office Version:Excel 2007
Posts: 3
hapachris is becoming part of the community
Re: Category name in pivot chart

Thanks for your help.

Unfortunately I'm not very good in coding.
When I try to manually overwrite "Others" to "true", somehow all the other category names are changing to "true" as well.
Reply With Quote
  #4  
Old 07-01-2009, 07:42 AM
Andy Pope's Avatar
Andy Pope Andy Pope is offline
Forum Guru
 
Join Date: 10 May 2004
Location: Essex, UK
MS Office Version:2003 & 2007 sp2
Posts: 7,223
Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding Andy Pope Has a higher level of understanding
Re: Category name in pivot chart

can you post example file?
__________________
Cheers
Andy
www.andypope.info
Reply With Quote
  #5  
Old 07-02-2009, 05:17 AM
hapachris hapachris is offline
Registered User
 
Join Date: 01 Jul 2009
Location: Tokyo
MS Office Version:Excel 2007
Posts: 3
hapachris is becoming part of the community
Re: Category name in pivot chart

Hello Andy Pope.
Thanks for your help!
I found a work-around. When I import the pivot charts to PowerPoint, I can manually overwrite the category names, without changing all the other names as well.
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump