Closed Thread
Results 1 to 3 of 3

Keep Same Colour with product

  1. #1
    Dennis
    Guest

    Keep Same Colour with product

    I have a pie chart which is based on the sales of my top 5 products each
    quarter.
    If I have a total of 20 products, I want to assign a different colour to
    each product. This colour remains the same for this product always whether it
    appears in my top 5 list or not.
    How do I get my pie chart segments to always be the same correct colour each
    quarter ?

  2. #2
    Andy Pope
    Guest

    Re: Keep Same Colour with product

    Hi,

    You may have to resort to VBA for this.

    Some code like this where the i variable is the appropriate colorindex
    value for the slice.

    for i=1 to 5
    activechart.SeriesCollection(1). _
    points(i).interior.colorindex = i
    next i

    Cheers
    Andy

    Dennis wrote:
    > I have a pie chart which is based on the sales of my top 5 products each
    > quarter.
    > If I have a total of 20 products, I want to assign a different colour to
    > each product. This colour remains the same for this product always whether it
    > appears in my top 5 list or not.
    > How do I get my pie chart segments to always be the same correct colour each
    > quarter ?


    --

    Andy Pope, Microsoft MVP - Excel
    http://www.andypope.info

  3. #3
    Dennis
    Guest

    Re: Keep Same Colour with product

    Thanks for that, worked a treat !

    "Andy Pope" wrote:

    > Hi,
    >
    > You may have to resort to VBA for this.
    >
    > Some code like this where the i variable is the appropriate colorindex
    > value for the slice.
    >
    > for i=1 to 5
    > activechart.SeriesCollection(1). _
    > points(i).interior.colorindex = i
    > next i
    >
    > Cheers
    > Andy
    >
    > Dennis wrote:
    > > I have a pie chart which is based on the sales of my top 5 products each
    > > quarter.
    > > If I have a total of 20 products, I want to assign a different colour to
    > > each product. This colour remains the same for this product always whether it
    > > appears in my top 5 list or not.
    > > How do I get my pie chart segments to always be the same correct colour each
    > > quarter ?

    >
    > --
    >
    > Andy Pope, Microsoft MVP - Excel
    > http://www.andypope.info
    >


Closed Thread

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