<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: VBA Conditional Formatting of Charts by Category Label</title>
	<atom:link href="http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-category-label/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-category-label/</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Fri, 10 Feb 2012 23:37:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-category-label/comment-page-2/#comment-170741</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 05 Jan 2012 17:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-category-label/#comment-170741</guid>
		<description>Ben -

In general this approach will work for any chart type. You need to use the appropriate formatting syntax for the chart elements. Make sure the series uses the right range for its X values.

What&#039;s the text? If you need to handle this by numeric ranges, then simple text may not work. It may be better to try adapting this approach to your project:
http://peltiertech.com/Excel/Charts/ConditionalChart1.html</description>
		<content:encoded><![CDATA[<p>Ben -</p>
<p>In general this approach will work for any chart type. You need to use the appropriate formatting syntax for the chart elements. Make sure the series uses the right range for its X values.</p>
<p>What&#8217;s the text? If you need to handle this by numeric ranges, then simple text may not work. It may be better to try adapting this approach to your project:<br />
<a href="http://peltiertech.com/Excel/Charts/ConditionalChart1.html" rel="nofollow">http://peltiertech.com/Excel/Charts/ConditionalChart1.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ben</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-category-label/comment-page-2/#comment-170738</link>
		<dc:creator>ben</dc:creator>
		<pubDate>Thu, 05 Jan 2012 17:29:15 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-category-label/#comment-170738</guid>
		<description>Will this code work with scatterplots?  They can be &#039;filled&#039; with an interior color...but i am running into issues with the .Points(iCategory) line.  I don&#039;t think rCategory is picking up the text.  Oh - and .XValues doesn&#039;t point to the labels.

Thoughts?</description>
		<content:encoded><![CDATA[<p>Will this code work with scatterplots?  They can be &#8216;filled&#8217; with an interior color&#8230;but i am running into issues with the .Points(iCategory) line.  I don&#8217;t think rCategory is picking up the text.  Oh &#8211; and .XValues doesn&#8217;t point to the labels.</p>
<p>Thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vivienne</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-category-label/comment-page-2/#comment-158525</link>
		<dc:creator>Vivienne</dc:creator>
		<pubDate>Sun, 27 Nov 2011 20:49:16 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-category-label/#comment-158525</guid>
		<description>Hi Jon, 

Thanks for your reply. 

It doesn&#039;t come up with the error message anymore.  However when I click a button which i created for the macro, it doesn&#039;t colour the chart according to my specified colour scheme? Could you advise please? 

I am using office 2010 incase you may need to know... 

Thanks again</description>
		<content:encoded><![CDATA[<p>Hi Jon, </p>
<p>Thanks for your reply. </p>
<p>It doesn&#8217;t come up with the error message anymore.  However when I click a button which i created for the macro, it doesn&#8217;t colour the chart according to my specified colour scheme? Could you advise please? </p>
<p>I am using office 2010 incase you may need to know&#8230; </p>
<p>Thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-category-label/comment-page-2/#comment-158174</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Sat, 26 Nov 2011 17:37:33 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-category-label/#comment-158174</guid>
		<description>Vivienne -

When it fails, and the .Points(iCategory)... line is highlighted yellow, open the Immediate Window, type the following, and press Enter:

?rCategory Is Nothing

If it returns True, then your previous statement did not find the matching label in the color-coded range.</description>
		<content:encoded><![CDATA[<p>Vivienne -</p>
<p>When it fails, and the .Points(iCategory)&#8230; line is highlighted yellow, open the Immediate Window, type the following, and press Enter:</p>
<p>?rCategory Is Nothing</p>
<p>If it returns True, then your previous statement did not find the matching label in the color-coded range.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vivienne</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-category-label/comment-page-2/#comment-157492</link>
		<dc:creator>Vivienne</dc:creator>
		<pubDate>Thu, 24 Nov 2011 15:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-category-label/#comment-157492</guid>
		<description>Hi Jon, 

thank you for posting this code up, I have tried to apply it to my chart however like others it keeps coming up with an error on line 
&quot;.Points(iCategory).Interior.ColorIndex = rCategory.Interior.ColorIndex&quot; and error message &quot;object variable and with block variable not set&quot; 

I am looking to colour pie charts and stack bar charts with specific colours. this is the code i have used so far:


Sub colourchart ()

  Dim rPatterns As Range
  Dim iCategory As Long
  Dim vCategories As Variant
  Dim rCategory As Range

  Set rPatterns = ActiveWorkbook.Worksheets(&quot;Chart Colour Coding&quot;).Range(&quot;E5:E18&quot;)
  For Each chtob In ActiveSheet.ChartObjects
    With chtob.Chart.SeriesCollection(1)
    vCategories = .XValues
    For iCategory = 1 To UBound(vCategories)
      Set rCategory = rPatterns.Find(What:=vCategories(iCategory))
      .Points(iCategory).Interior.ColorIndex = rCategory.Interior.ColorIndex

      
Next
End With
Next
End Sub

---
any help is greatly appreciated! 

Also, one last thing, is it possible to not display empty cells within the data range for a chart? It doesnt display on the actual chart, but you can still see on the legend / data labels... 

thanks</description>
		<content:encoded><![CDATA[<p>Hi Jon, </p>
<p>thank you for posting this code up, I have tried to apply it to my chart however like others it keeps coming up with an error on line<br />
&#8220;.Points(iCategory).Interior.ColorIndex = rCategory.Interior.ColorIndex&#8221; and error message &#8220;object variable and with block variable not set&#8221; </p>
<p>I am looking to colour pie charts and stack bar charts with specific colours. this is the code i have used so far:</p>
<p>Sub colourchart ()</p>
<p>  Dim rPatterns As Range<br />
  Dim iCategory As Long<br />
  Dim vCategories As Variant<br />
  Dim rCategory As Range</p>
<p>  Set rPatterns = ActiveWorkbook.Worksheets(&#8220;Chart Colour Coding&#8221;).Range(&#8220;E5:E18&#8243;)<br />
  For Each chtob In ActiveSheet.ChartObjects<br />
    With chtob.Chart.SeriesCollection(1)<br />
    vCategories = .XValues<br />
    For iCategory = 1 To UBound(vCategories)<br />
      Set rCategory = rPatterns.Find(What:=vCategories(iCategory))<br />
      .Points(iCategory).Interior.ColorIndex = rCategory.Interior.ColorIndex</p>
<p>Next<br />
End With<br />
Next<br />
End Sub</p>
<p>&#8212;<br />
any help is greatly appreciated! </p>
<p>Also, one last thing, is it possible to not display empty cells within the data range for a chart? It doesnt display on the actual chart, but you can still see on the legend / data labels&#8230; </p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-category-label/comment-page-2/#comment-148161</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 27 Oct 2011 19:47:46 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-category-label/#comment-148161</guid>
		<description>Rick -

Sure, this is possible using a VBA technique like this or &lt;a href=&quot;http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/&quot; title=&quot;VBA Conditional Formatting of Charts by Value&quot; rel=&quot;nofollow&quot;&gt;VBA Conditional Formatting of Charts by Value&lt;/a&gt;. Or you could use worksheet formulas, as in &lt;a href=&quot;http://peltiertech.com/Excel/Charts/ConditionalChart1.html&quot; title=&quot;Conditional Charts&quot; rel=&quot;nofollow&quot;&gt;Conditional Charts&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Rick -</p>
<p>Sure, this is possible using a VBA technique like this or <a href="http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/" title="VBA Conditional Formatting of Charts by Value" rel="nofollow">VBA Conditional Formatting of Charts by Value</a>. Or you could use worksheet formulas, as in <a href="http://peltiertech.com/Excel/Charts/ConditionalChart1.html" title="Conditional Charts" rel="nofollow">Conditional Charts</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

