![]() |
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 ? |
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 |
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 |
All times are GMT +1. The time now is 06:53 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com