+ Reply to Thread
Results 1 to 3 of 3

How to automatically extend a pie chart to include categories when they have values

  1. #1
    Registered User
    Join Date
    01-08-2014
    Location
    Bath, UK
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    86

    How to automatically extend a pie chart to include categories when they have values

    I have a pie chart on a pre-defined table with 15 categories where the data will populate over time (presently only 3 are populated) in descending order. As some categories will be blank/zero for a while, I'm trying to find a way to avoid showing the blanks/zeros on the pie chart. As I am trying to display the legend on the pie chart segment, any zeros cause the remaining labels to appear grouped together and rather messy. I would therefore like to hide the zero data from the pie chart so the labels do not appear, or to automatically extend the range to only include all non-zero values.

    I found the following formula which, when used as a named range, automatically extends a list for data validation:
    Please Login or Register  to view this content.
    I don't know whether there's a similar formula or whether a few lines of VBA are required to run whenever the chart or data worksheet are selected..?

    Any chance of help, please?

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,620

    Re: How to automatically extend a pie chart to include categories when they have values

    Try to use autofilter, to show only non-zero rows with data. But build your pie chart for all data.
    See attached - switch off filtering and you will see probably the same mess as you see now on your chart.

    By the way, 15 catergories is already quite a lot for pie chart (unless all are pretty close making circa 360deg/15 = 24 deg slices)
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,620

    Re: How to automatically extend a pie chart to include categories when they have values

    The other approach - prepare your data this way, that pie series includes NA() where zero/blank value would be. So with a formula like (real data is assumed here to be in column G):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    then, drawing pie chart you will have all categories in legend but neither slice nor label for blank/zero category
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How Does One Extend a Range to Include One Row of Data?
    By StevenM in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2012, 11:02 AM
  2. Replies: 1
    Last Post: 01-03-2012, 02:34 PM
  3. Chart Automatically update and extend
    By surfengine in forum Excel General
    Replies: 1
    Last Post: 11-17-2006, 01:19 PM
  4. Automatically updating chart to include new column with VBA
    By Gary in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2006, 03:55 PM
  5. [SOLVED] Excel should not automatically extend series or fill values
    By whisperlm in forum Excel General
    Replies: 0
    Last Post: 07-13-2005, 03:05 PM

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.6.0 RC 1