<?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 Value</title>
	<atom:link href="http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Wed, 23 May 2012 11:03:15 +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: Annamaria R</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/comment-page-1/#comment-219825</link>
		<dc:creator>Annamaria R</dc:creator>
		<pubDate>Tue, 15 May 2012 17:17:25 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-value/#comment-219825</guid>
		<description>Thank you so much Jon!! This works perfectly.</description>
		<content:encoded><![CDATA[<p>Thank you so much Jon!! This works perfectly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/comment-page-1/#comment-219802</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Tue, 15 May 2012 16:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-value/#comment-219802</guid>
		<description>Annamaria -

You have to make some adjustments to the code. It&#039;s probably easiest to select the chart on its sheet before running the code, so you need to specify the sheet that contains the formatted range. Also you need to cycle through the series in the chart.

&lt;pre class=&quot;vbasmall&quot;&gt;&lt;code&gt;Sub ColorByValue() 
  Dim rPatterns As Range 
  Dim iPattern As Long 
  Dim vPatterns As Variant 
  Dim iSrs As Long
  Dim iPoint As Long 
  Dim vValues As Variant 
  Dim rValue As Range 

  &lt;font color=&quot;#00C000&quot;&gt;&#039;&#039; Specify sheet containing the formatted range&lt;/font&gt;
  Set rPatterns = Worksheets(&quot;Formats&quot;).Range(&quot;A1:A4&quot;) 
  vPatterns = rPatterns.Value

  &lt;font color=&quot;#00C000&quot;&gt;&#039;&#039; Cycle through all series in chart&lt;/font&gt;
  &lt;font color=&quot;#00C000&quot;&gt;&#039;&#039; Alternatively identify intended series as, e.g.,&lt;/font&gt;
  &lt;font color=&quot;#00C000&quot;&gt;&#039;&#039; SeriesCollection(5) or SeriesCollection(&quot;Series Name&quot;)&lt;/font&gt;
  For iSrs = 1 To ActiveChart.SeriesCollection.Count 
    With ActiveChart.SeriesCollection(iSrs) 
      vValues = .Values 
      For iPoint = 1 To UBound(vValues) 
        For iPattern = 1 To UBound(vPatterns) 
          If vValues(iPoint) &lt;= vPatterns(iPattern, 1) Then 
            .Points(iPoint).Interior.ColorIndex = 
                _ rPatterns.Cells(iPattern, 1).Interior.ColorIndex 
            Exit For 
          End If 
        Next 
      Next 
    End With 
  Next
End Sub&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Annamaria -</p>
<p>You have to make some adjustments to the code. It&#8217;s probably easiest to select the chart on its sheet before running the code, so you need to specify the sheet that contains the formatted range. Also you need to cycle through the series in the chart.</p>
<pre class="vbasmall"><code>Sub ColorByValue()
  Dim rPatterns As Range
  Dim iPattern As Long
  Dim vPatterns As Variant
  Dim iSrs As Long
  Dim iPoint As Long
  Dim vValues As Variant
  Dim rValue As Range 

  <font color="#00C000">'' Specify sheet containing the formatted range</font>
  Set rPatterns = Worksheets("Formats").Range("A1:A4")
  vPatterns = rPatterns.Value

  <font color="#00C000">'' Cycle through all series in chart</font>
  <font color="#00C000">'' Alternatively identify intended series as, e.g.,</font>
  <font color="#00C000">'' SeriesCollection(5) or SeriesCollection("Series Name")</font>
  For iSrs = 1 To ActiveChart.SeriesCollection.Count
    With ActiveChart.SeriesCollection(iSrs)
      vValues = .Values
      For iPoint = 1 To UBound(vValues)
        For iPattern = 1 To UBound(vPatterns)
          If vValues(iPoint) < = vPatterns(iPattern, 1) Then
            .Points(iPoint).Interior.ColorIndex =
                _ rPatterns.Cells(iPattern, 1).Interior.ColorIndex
            Exit For
          End If
        Next
      Next
    End With
  Next
End Sub</code></code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Annamaria R</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/comment-page-1/#comment-219736</link>
		<dc:creator>Annamaria R</dc:creator>
		<pubDate>Tue, 15 May 2012 13:00:50 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-value/#comment-219736</guid>
		<description>Hello,
When I duplicate the example you have above, I am able to get the VBA to work..however when I try and use it on my spreadsheet, it is not working, and I think it has something to do with the fact that I have multiple series, as well as the chart in a different tab. Help?
Thanks in advance,
Annamaria</description>
		<content:encoded><![CDATA[<p>Hello,<br />
When I duplicate the example you have above, I am able to get the VBA to work..however when I try and use it on my spreadsheet, it is not working, and I think it has something to do with the fact that I have multiple series, as well as the chart in a different tab. Help?<br />
Thanks in advance,<br />
Annamaria</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Katie</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/comment-page-1/#comment-204558</link>
		<dc:creator>Katie</dc:creator>
		<pubDate>Wed, 04 Apr 2012 13:29:46 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-value/#comment-204558</guid>
		<description>Thanks Jon,

What I am attempting to do is to automate a sort of supplier KPI &quot;steering wheel&quot;, so each segment of my pie chart, whilst sized according to weighting rather than value, is scored individually and against differing criteria. If I can get this working it will save hours and hours every month!!

Many many thanks,
Katie</description>
		<content:encoded><![CDATA[<p>Thanks Jon,</p>
<p>What I am attempting to do is to automate a sort of supplier KPI &#8220;steering wheel&#8221;, so each segment of my pie chart, whilst sized according to weighting rather than value, is scored individually and against differing criteria. If I can get this working it will save hours and hours every month!!</p>
<p>Many many thanks,<br />
Katie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/comment-page-1/#comment-202212</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 29 Mar 2012 12:39:45 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-value/#comment-202212</guid>
		<description>Katie -

You might be trying to squeeze more meaning into your pie chart than is possible to extract. But anyway, what you want is possible, though it takes a more complicated algorithm. Hang tight and I&#039;ll write it up in a new post.</description>
		<content:encoded><![CDATA[<p>Katie -</p>
<p>You might be trying to squeeze more meaning into your pie chart than is possible to extract. But anyway, what you want is possible, though it takes a more complicated algorithm. Hang tight and I&#8217;ll write it up in a new post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Katie</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/comment-page-1/#comment-202143</link>
		<dc:creator>Katie</dc:creator>
		<pubDate>Thu, 29 Mar 2012 10:42:29 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/2008/03/03/vba-conditional-formatting-of-charts-by-value/#comment-202143</guid>
		<description>Hi,

I am very new to VBA and this has been amazingly instructive &amp; helpful!!

I would love to be able to adapt the original code so that I can use a different range to assign the correct colour for each different chart point in my pie chart. I don&#039;t know how to select each point individually and then move on to the next one, rather than loop through all of the points assessing them all against the same range. Can you help me?

Thanks so much!!
Katie</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am very new to VBA and this has been amazingly instructive &amp; helpful!!</p>
<p>I would love to be able to adapt the original code so that I can use a different range to assign the correct colour for each different chart point in my pie chart. I don&#8217;t know how to select each point individually and then move on to the next one, rather than loop through all of the points assessing them all against the same range. Can you help me?</p>
<p>Thanks so much!!<br />
Katie</p>
]]></content:encoded>
	</item>
</channel>
</rss>

