Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 473
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 473
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional colors for bars in a chart??? Meenie Charts and Charting in Excel 7 July 19th 07 02:02 AM
How can I combine a stacked bar chart with stacked colum chart? Sin Charts and Charting in Excel 8 December 20th 05 03:50 AM
How to carry over conditional format colors to a chart Tim A Charts and Charting in Excel 1 April 1st 05 12:59 AM
To create a stacked column chart and group the stacked bars togeth Jacqueline Charts and Charting in Excel 1 February 17th 05 11:05 PM
How can I create a stacked bar chart with stacked bars side by TimMC Charts and Charting in Excel 1 January 22nd 05 02:09 AM


All times are GMT +1. The time now is 01:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"