+ Reply to Thread
Results 1 to 6 of 6

VBA Add Series to Exploded Pie Chart

  1. #1
    Registered User
    Join Date
    03-10-2024
    Location
    Berlin
    MS-Off Ver
    mac2016
    Posts
    91

    VBA Add Series to Exploded Pie Chart

    Finally managed to add a second Series to an Exploded Pie Chart.
    But can't work out, how to have the whole procedure in one Macro.
    How would I set 2 DataRanges in the first Macro?

    Macro 1: CreateChart
    Macro 2: AddSeries2
    Macro 3: Format Series2 Labels+Explosion+AxisGroup, Series1 Explosion
    Macro 4: Format Series1 Explosion

    Also, I have to format the Series1 Explosion twice, Macros 3+4 (found out by clicking).
    This can't be right, can it?

    I've attached the xlsm.

    Thanks again for any help!
    Toni

    Macro1: CreateChart
    Please Login or Register  to view this content.
    Macro2: AddSeries2
    Please Login or Register  to view this content.
    Macro 3: Format Series2 Labels+Explosion+AxisGroup, Series1 Explosion
    Please Login or Register  to view this content.
    Macro 4: Format Series1 Explosion
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: VBA Add Series to Exploded Pie Chart

    try

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    03-10-2024
    Location
    Berlin
    MS-Off Ver
    mac2016
    Posts
    91

    Re: VBA Add Series to Exploded Pie Chart

    Andy, once again: wow!

    Just one thing: it would be extra nice to have Series1 "on top". Might that be possible, too?
    With another "Axis-Setting" maybe? (Took me a while to get that right as well.)

    Thank you so much!
    Toni

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: VBA Add Series to Exploded Pie Chart

    You need 2 series before you can change the axisgroup.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-10-2024
    Location
    Berlin
    MS-Off Ver
    mac2016
    Posts
    91

    Re: VBA Add Series to Exploded Pie Chart

    Ok, yes, makes sense.
    Thank you so much!

  6. #6
    Banned User!
    Join Date
    03-11-2024
    Location
    usa
    MS-Off Ver
    CURRENT
    Posts
    23

    Re: VBA Add Series to Exploded Pie Chart

    To combine all of these steps into one macro, you need to copy the contents of each of your macros inside a single procedure. Replace the comments "Macro 1", "Macro 2", etc. with the contents of the corresponding macros. Note that you will also have to insert all the variables and function declarations used in your macros inside this combined procedure. After combining the macros into one, you can perform all the necessary actions in one operation, which should simplify your process of working with pie charts.

+ 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. Pie chart exploded
    By Vokey9 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-29-2016, 07:40 AM
  2. Exploded Pie Chart - Dealing with Zero Values
    By glosos in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-23-2013, 06:52 AM
  3. Exploded Graphic Chart?
    By emscheer in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 11-28-2006, 03:32 PM
  4. exploded pie chart (2d)
    By tikchye_oldLearner57 in forum Excel General
    Replies: 1
    Last Post: 07-10-2006, 04:39 AM
  5. exploded pie chart with background picture
    By rvExcelNewTip in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 08-01-2005, 01:54 PM
  6. How to pie chart with 2 values and one exploded for definition?
    By jeffmuoio in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-16-2005, 10:42 AM
  7. how do i create an exploded bar chart
    By sami b in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 01-26-2005, 09:06 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