<?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: Dynamic Chart using Pivot Table and VBA</title>
	<atom:link href="http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/</link>
	<description>PTS Excel Charts and Tutorials Blog</description>
	<lastBuildDate>Sat, 21 Nov 2009 04:01:08 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<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/dynamic-chart-using-pivot-table-and-vba/comment-page-1/#comment-19023</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Sat, 12 Sep 2009 13:58:42 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=62#comment-19023</guid>
		<description>Barb -

Oh, you wanted to do this programmatically. I didn&#039;t understand why you were having that problem.

Try using the address rather than the range object:

.Name = &quot;=&quot; &amp; rSeriesNames.Columns(iSeries).Address( , , xlR1C1, True)</description>
		<content:encoded><![CDATA[<p>Barb -</p>
<p>Oh, you wanted to do this programmatically. I didn&#8217;t understand why you were having that problem.</p>
<p>Try using the address rather than the range object:</p>
<p>.Name = &#8220;=&#8221; &#038; rSeriesNames.Columns(iSeries).Address( , , xlR1C1, True)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barb Reinhardt</title>
		<link>http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/comment-page-1/#comment-19017</link>
		<dc:creator>Barb Reinhardt</dc:creator>
		<pubDate>Sat, 12 Sep 2009 10:08:14 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=62#comment-19017</guid>
		<description>I&#039;m not sure you understood the question, but I&#039;ve figured out most of it.   I still need to define the name of a chart series programmatically.    When I use something like this:

With cht.SeriesCollection(iSeries)
            .Name = rSeriesNames.Columns(iSeries)
            .Values = rValues.Columns(iSeries)
            .XValues = rCategories

        End With

There is a name tied to the series in the chart that I want, but it&#039;s not displayed in the series formula, nor is it displayed when I edit the series.   It looks like 

=SERIES(,Sheet1!B1:AC1,Sheet1!B2:AC2,1)  &#039;Don&#039;t have the series right in front of me.

I want something like this

=Series(Sheet1!A1,...

Thanks again, 

Barb</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure you understood the question, but I&#8217;ve figured out most of it.   I still need to define the name of a chart series programmatically.    When I use something like this:</p>
<p>With cht.SeriesCollection(iSeries)<br />
            .Name = rSeriesNames.Columns(iSeries)<br />
            .Values = rValues.Columns(iSeries)<br />
            .XValues = rCategories</p>
<p>        End With</p>
<p>There is a name tied to the series in the chart that I want, but it&#8217;s not displayed in the series formula, nor is it displayed when I edit the series.   It looks like </p>
<p>=SERIES(,Sheet1!B1:AC1,Sheet1!B2:AC2,1)  &#8216;Don&#8217;t have the series right in front of me.</p>
<p>I want something like this</p>
<p>=Series(Sheet1!A1,&#8230;</p>
<p>Thanks again, </p>
<p>Barb</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/comment-page-1/#comment-19010</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Sat, 12 Sep 2009 02:57:29 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=62#comment-19010</guid>
		<description>Hi Barb -

You can simply select the series and edit the series formula in the formula bar. Alternatively (but less directly), you can open the source data dialog and change the definitions of the series name, X values, and Y values in the dialog.

Excel 2007 had problems at first when the series formula was edited directly, but SP1 or SP2 fixed that.</description>
		<content:encoded><![CDATA[<p>Hi Barb -</p>
<p>You can simply select the series and edit the series formula in the formula bar. Alternatively (but less directly), you can open the source data dialog and change the definitions of the series name, X values, and Y values in the dialog.</p>
<p>Excel 2007 had problems at first when the series formula was edited directly, but SP1 or SP2 fixed that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barb Reinhardt</title>
		<link>http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/comment-page-1/#comment-18994</link>
		<dc:creator>Barb Reinhardt</dc:creator>
		<pubDate>Fri, 11 Sep 2009 18:51:15 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=62#comment-18994</guid>
		<description>Jon,

I&#039;d like to add the range &quot;ChtLabel&quot; as the XVal and &quot;Loc_13&quot; as the Value and have it display in the series definition.   Also, when I use your method, the &quot;name&quot; is not listed in the series formula.   It looks something like this

=SERIES(,&#039;Sheet1&#039;!$C$1:$AB$1,&#039;Sheet1&#039;!$C$14:$AB$14,13)

and I want

=SERIES(&quot;MyName&quot;,&#039;Sheet1&#039;!ChtLabel,&#039;Sheet1&#039;!Loc_13,13)

How would I go about doing that?

Thanks a bunch,
Barb</description>
		<content:encoded><![CDATA[<p>Jon,</p>
<p>I&#8217;d like to add the range &#8220;ChtLabel&#8221; as the XVal and &#8220;Loc_13&#8243; as the Value and have it display in the series definition.   Also, when I use your method, the &#8220;name&#8221; is not listed in the series formula.   It looks something like this</p>
<p>=SERIES(,&#8217;Sheet1&#8242;!$C$1:$AB$1,&#8217;Sheet1&#8242;!$C$14:$AB$14,13)</p>
<p>and I want</p>
<p>=SERIES(&#8221;MyName&#8221;,&#8217;Sheet1&#8242;!ChtLabel,&#8217;Sheet1&#8242;!Loc_13,13)</p>
<p>How would I go about doing that?</p>
<p>Thanks a bunch,<br />
Barb</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/comment-page-1/#comment-18350</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 27 Aug 2009 17:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=62#comment-18350</guid>
		<description>&lt;pre class=&quot;vbasmall&quot;&gt;Sub ColorBySeriesName()
  Dim rPatterns As Range
  Dim iSeries As Long
  Dim rSeries As Range
  Dim iColorIndex As Long
  Dim chtTemp As ChartObject
  &lt;font color=#0000FF&gt;Dim wsTemp As Worksheet&lt;/font&gt;
    
  Set rPatterns = ActiveSheet.Range(&quot;BC1:BD8&quot;)

  &lt;font color=#0000FF&gt;For Each wsTemp In ActiveWorkbook.Worksheets&lt;/font&gt;
    For Each chtTemp In wsTemp.ChartObjects

    With chtTemp.Chart
      For iSeries = 1 To .SeriesCollection.Count
        Set rSeries = rPatterns.Find(What:=.SeriesCollection(iSeries).Name)
        If Not rSeries Is Nothing Then
          iColorIndex = rSeries.Interior.ColorIndex
          With .SeriesCollection(iSeries)
            .Border.ColorIndex = iColorIndex
            .Border.Weight = xlMedium
            .MarkerForegroundColorIndex = iColorIndex
            .MarkerBackgroundColorIndex = iColorIndex
            .MarkerStyle = xlTriangle
          End With
        End If
      Next
    End With
    Next
  &lt;font color=#0000FF&gt;Next&lt;/font&gt;
End Sub&lt;br /&gt; 
&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<pre class="vbasmall">Sub ColorBySeriesName()
  Dim rPatterns As Range
  Dim iSeries As Long
  Dim rSeries As Range
  Dim iColorIndex As Long
  Dim chtTemp As ChartObject
  <font color=#0000FF>Dim wsTemp As Worksheet</font>

  Set rPatterns = ActiveSheet.Range("BC1:BD8")

  <font color=#0000FF>For Each wsTemp In ActiveWorkbook.Worksheets</font>
    For Each chtTemp In wsTemp.ChartObjects

    With chtTemp.Chart
      For iSeries = 1 To .SeriesCollection.Count
        Set rSeries = rPatterns.Find(What:=.SeriesCollection(iSeries).Name)
        If Not rSeries Is Nothing Then
          iColorIndex = rSeries.Interior.ColorIndex
          With .SeriesCollection(iSeries)
            .Border.ColorIndex = iColorIndex
            .Border.Weight = xlMedium
            .MarkerForegroundColorIndex = iColorIndex
            .MarkerBackgroundColorIndex = iColorIndex
            .MarkerStyle = xlTriangle
          End With
        End If
      Next
    End With
    Next
  <font color=#0000FF>Next</font>
End Sub 
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: NMullis</title>
		<link>http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/comment-page-1/#comment-18198</link>
		<dc:creator>NMullis</dc:creator>
		<pubDate>Tue, 25 Aug 2009 19:43:02 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=62#comment-18198</guid>
		<description>Jon, I have one more question. How can I apply this code to all charts in my workbook?

&lt;pre class=&quot;vbasmall&quot;&gt;Sub ColorBySeriesName()
  Dim rPatterns As Range
  Dim iSeries As Long
  Dim rSeries As Range
  Dim iColorIndex As Long
  Dim chtTemp As ChartObject
    
  Set rPatterns = ActiveSheet.Range(&quot;BC1:BD8&quot;)

  For Each chtTemp In ActiveSheet.ChartObjects

  With chtTemp.Chart
    For iSeries = 1 To .SeriesCollection.Count
      Set rSeries = rPatterns.Find(What:=.SeriesCollection(iSeries).Name)
      If Not rSeries Is Nothing Then
        iColorIndex = rSeries.Interior.ColorIndex
        With .SeriesCollection(iSeries)
          .Border.ColorIndex = iColorIndex
          .Border.Weight = xlMedium
          .MarkerForegroundColorIndex = iColorIndex
          .MarkerBackgroundColorIndex = iColorIndex
          .MarkerStyle = xlTriangle
        End With
      End If
    Next
  End With
  Next
End Sub&lt;br /&gt;&#160;
&lt;/pre&gt;

Thank you! Your assistance has been invaluable!
N</description>
		<content:encoded><![CDATA[<p>Jon, I have one more question. How can I apply this code to all charts in my workbook?</p>
<pre class="vbasmall">Sub ColorBySeriesName()
  Dim rPatterns As Range
  Dim iSeries As Long
  Dim rSeries As Range
  Dim iColorIndex As Long
  Dim chtTemp As ChartObject

  Set rPatterns = ActiveSheet.Range("BC1:BD8")

  For Each chtTemp In ActiveSheet.ChartObjects

  With chtTemp.Chart
    For iSeries = 1 To .SeriesCollection.Count
      Set rSeries = rPatterns.Find(What:=.SeriesCollection(iSeries).Name)
      If Not rSeries Is Nothing Then
        iColorIndex = rSeries.Interior.ColorIndex
        With .SeriesCollection(iSeries)
          .Border.ColorIndex = iColorIndex
          .Border.Weight = xlMedium
          .MarkerForegroundColorIndex = iColorIndex
          .MarkerBackgroundColorIndex = iColorIndex
          .MarkerStyle = xlTriangle
        End With
      End If
    Next
  End With
  Next
End Sub&nbsp;
</pre>
<p>Thank you! Your assistance has been invaluable!<br />
N</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Weir</title>
		<link>http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/comment-page-1/#comment-16581</link>
		<dc:creator>Jeff Weir</dc:creator>
		<pubDate>Wed, 22 Jul 2009 22:54:57 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=62#comment-16581</guid>
		<description>Exactly. I&#039;ve taken your advice, and put X values in the row fields, with series in columns
I&#039;ve had a go at modifying your code so it just plots one product (i.e. I filtered the pivottable to 1 product).

I hardcoded the macro so it just dealt with one series on the chart, and got it to plot the series just fine. Bu I couldn&#039;t  work out how to change your macro so that I got dates for x axis names. THen in playing around trying to fix that, I somehow mucked up the macro entirely. 

I&#039;m gonna park it for now, and continue with my existing spagetti of getpivotdata formulas as I&#039;ve got to deliver this tomorrow. 

Cheers</description>
		<content:encoded><![CDATA[<p>Exactly. I&#8217;ve taken your advice, and put X values in the row fields, with series in columns<br />
I&#8217;ve had a go at modifying your code so it just plots one product (i.e. I filtered the pivottable to 1 product).</p>
<p>I hardcoded the macro so it just dealt with one series on the chart, and got it to plot the series just fine. Bu I couldn&#8217;t  work out how to change your macro so that I got dates for x axis names. THen in playing around trying to fix that, I somehow mucked up the macro entirely. </p>
<p>I&#8217;m gonna park it for now, and continue with my existing spagetti of getpivotdata formulas as I&#8217;ve got to deliver this tomorrow. </p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/comment-page-1/#comment-16558</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Wed, 22 Jul 2009 13:28:33 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=62#comment-16558</guid>
		<description>Jeff -

Is it as simple as you want to plot each row as a series, with the months as your category labels, and the product names as series names? I&#039;ve gotten into the habit of always putting my X values in the row fields, with my series in columns. I always have to stop and think when the data is arranged differently.

I have a post waiting to be written which will help describe how to program pivot tables,</description>
		<content:encoded><![CDATA[<p>Jeff -</p>
<p>Is it as simple as you want to plot each row as a series, with the months as your category labels, and the product names as series names? I&#8217;ve gotten into the habit of always putting my X values in the row fields, with my series in columns. I always have to stop and think when the data is arranged differently.</p>
<p>I have a post waiting to be written which will help describe how to program pivot tables,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeff weir</title>
		<link>http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/comment-page-1/#comment-16550</link>
		<dc:creator>jeff weir</dc:creator>
		<pubDate>Wed, 22 Jul 2009 10:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=62#comment-16550</guid>
		<description>I&#039;ve just had a play with this, and found it VERY cool indeed. I&#039;ve been using GETPIVOTDATA functions and parking spaces as per my earlier comment above. I now see the error of my ways....

Only thing is that my data has individual products in my one and only  row field, and months of the year in the column field,  with sum of revenue in the data field. So the layout is similar to the picture you posted in your last comment, except that every square in the matrix has data in it. i.e. something like this:
                      Jan        Feb        March
Product 1       10         12          12
Product 2       5            6            8
Product 3       15          13          2
Product 4        8           7            6

I&#039;m trying to work out how to amend your code so that I can plot each product against time on seperate line graphs called &#039;Product 1 graph&#039;, Product 2 graph&#039;, etc. 

I suspect I just need to switch a few things in your code around, and add a loop so it updates every product chart. But I&#039;m struggling....still learning this VBA beast, not to mention proper pt diction. 

Any chance you could help steer me in the right direction? Of course, I realise it would be some miracle if you actually have ANY free time between earning a living and answering the zillions of requests you get like this :-)

Meanwhile I&#039;ll keep chipping away to see if I can crack it. ANd crack it I must...this cuts down on SOOOO much complexity in the way I currently do things.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve just had a play with this, and found it VERY cool indeed. I&#8217;ve been using GETPIVOTDATA functions and parking spaces as per my earlier comment above. I now see the error of my ways&#8230;.</p>
<p>Only thing is that my data has individual products in my one and only  row field, and months of the year in the column field,  with sum of revenue in the data field. So the layout is similar to the picture you posted in your last comment, except that every square in the matrix has data in it. i.e. something like this:<br />
                      Jan        Feb        March<br />
Product 1       10         12          12<br />
Product 2       5            6            8<br />
Product 3       15          13          2<br />
Product 4        8           7            6</p>
<p>I&#8217;m trying to work out how to amend your code so that I can plot each product against time on seperate line graphs called &#8216;Product 1 graph&#8217;, Product 2 graph&#8217;, etc. </p>
<p>I suspect I just need to switch a few things in your code around, and add a loop so it updates every product chart. But I&#8217;m struggling&#8230;.still learning this VBA beast, not to mention proper pt diction. </p>
<p>Any chance you could help steer me in the right direction? Of course, I realise it would be some miracle if you actually have ANY free time between earning a living and answering the zillions of requests you get like this :-)</p>
<p>Meanwhile I&#8217;ll keep chipping away to see if I can crack it. ANd crack it I must&#8230;this cuts down on SOOOO much complexity in the way I currently do things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/dynamic-chart-using-pivot-table-and-vba/comment-page-1/#comment-16424</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Sun, 19 Jul 2009 14:40:23 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=62#comment-16424</guid>
		<description>Another nice thing the VBA approach did without modification. If the Sub Category field is removed from the rows area of the pivot table, the chart updates very nicely, with a summary by main category without the second tier of category labels.

&lt;p align=center&gt;&lt;img src=&quot;http://peltiertech.com/images/2009-07/PvtTblSingleCatColumnVBA.png&quot;&gt;&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Another nice thing the VBA approach did without modification. If the Sub Category field is removed from the rows area of the pivot table, the chart updates very nicely, with a summary by main category without the second tier of category labels.</p>
<p align=center><img src="http://peltiertech.com/images/2009-07/PvtTblSingleCatColumnVBA.png"/></p>
]]></content:encoded>
	</item>
</channel>
</rss>
