Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional colors in stacked bar chart
I have a stacked bar chart with multiple bars, each with
multiple data points. I would like to loop thru each data point and change the chart color for each point based on the original cell value. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional colors in stacked bar chart
David wrote:
I have a stacked bar chart with multiple bars, each with multiple data points. I would like to loop thru each data point and change the chart color for each point based on the original cell value. I think you are out of luck. Colours are set at the series level, not the point level. The only variation you can get is InvertIfNegative (which is unlikely to be useful in a stacked bar chart). Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - reply in newsgroup |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional colors in stacked bar chart
Hi David,
You could use something like this. It will require extra code to determine the colour to use for any one of the points. Sub ColourPoint() Dim intSeries As Integer Dim intPoint As Integer With ActiveChart For intSeries = 1 To .SeriesCollection.Count With .SeriesCollection(intSeries) For intPoint = 1 To .Points.Count .Points(intPoint).Interior.ColorIndex = intSeries * intPoint Next End With Next End With End Sub david wrote: I have a stacked bar chart with multiple bars, each with multiple data points. I would like to loop thru each data point and change the chart color for each point based on the original cell value. -- Cheers Andy http://www.andypope.info |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional colors in stacked bar chart
Here's a non-VBA approach:
http://www.geocities.com/jonpeltier/...html#CondChart - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ david wrote: I have a stacked bar chart with multiple bars, each with multiple data points. I would like to loop thru each data point and change the chart color for each point based on the original cell value. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional colors in stacked bar chart
Bill Manville wrote:
I think you are out of luck. Nonsense (as demonstrated by the other replies). Indeed, I do it myself in one of my projects. Must have been asleep this morning when I replied. Sorry and thanks to those who gave the correct answer. Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - reply in newsgroup |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional colors for bars in a chart??? | Charts and Charting in Excel | |||
How can I combine a stacked bar chart with stacked colum chart? | Charts and Charting in Excel | |||
How to carry over conditional format colors to a chart | Charts and Charting in Excel | |||
To create a stacked column chart and group the stacked bars togeth | Charts and Charting in Excel | |||
How can I create a stacked bar chart with stacked bars side by | Charts and Charting in Excel |