+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    07-01-2009
    Location
    Tokyo
    MS-Off Ver
    Excel 2007
    Posts
    3

    Category name in pivot chart

    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

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,938

    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

  3. #3
    Registered User
    Join Date
    07-01-2009
    Location
    Tokyo
    MS-Off Ver
    Excel 2007
    Posts
    3

    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.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,938

    Re: Category name in pivot chart

    can you post example file?
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    07-01-2009
    Location
    Tokyo
    MS-Off Ver
    Excel 2007
    Posts
    3

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0