<?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: Pivot Table Conditional Formatting with VBA</title>
	<atom:link href="http://peltiertech.com/WordPress/pivot-table-conditional-formatting-with-vba/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress/pivot-table-conditional-formatting-with-vba/</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Wed, 23 May 2012 03:01:10 +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/pivot-table-conditional-formatting-with-vba/comment-page-1/#comment-223700</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Tue, 22 May 2012 17:55:32 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2534#comment-223700</guid>
		<description>Carly -

PivotCellType seems broken, but you could try this.

A cell&#039;s pivotfield is the field it contains the subtotal for. If it&#039;s a subtotal, though, it is not part of the pivot field&#039;s data range. So a cell (&quot;pvtCell&quot;) is part of the subtotal range of a pivot table (&quot;pt&quot;) if

Intersect(pvtCell, pt.PivotFields(pvtCell.PivotCell.PivotField.Name).DataRange)

is empty.</description>
		<content:encoded><![CDATA[<p>Carly -</p>
<p>PivotCellType seems broken, but you could try this.</p>
<p>A cell&#8217;s pivotfield is the field it contains the subtotal for. If it&#8217;s a subtotal, though, it is not part of the pivot field&#8217;s data range. So a cell (&#8220;pvtCell&#8221;) is part of the subtotal range of a pivot table (&#8220;pt&#8221;) if</p>
<p>Intersect(pvtCell, pt.PivotFields(pvtCell.PivotCell.PivotField.Name).DataRange)</p>
<p>is empty.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carly Bond</title>
		<link>http://peltiertech.com/WordPress/pivot-table-conditional-formatting-with-vba/comment-page-1/#comment-223646</link>
		<dc:creator>Carly Bond</dc:creator>
		<pubDate>Tue, 22 May 2012 15:55:36 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2534#comment-223646</guid>
		<description>Hi Jon,

I am using Excel 2007 and I am looking for a way of checking if a cell is part of a pivot table subtotal line, so that I can then do something else.  I am using the standard pivot table selection so there are bold lines where the subtotals are, but no actual word &#039;total&#039; like there is if you switch it to the classic view.

Do you know of anyway in which this can be done?

I have tried using:

i = Range(&quot;A5&quot;).PivotCell.PivotCellType

but it doesn&#039;t pick up anything different on a subtotal line to a normal line.

Any help would be greatly recieved.</description>
		<content:encoded><![CDATA[<p>Hi Jon,</p>
<p>I am using Excel 2007 and I am looking for a way of checking if a cell is part of a pivot table subtotal line, so that I can then do something else.  I am using the standard pivot table selection so there are bold lines where the subtotals are, but no actual word &#8216;total&#8217; like there is if you switch it to the classic view.</p>
<p>Do you know of anyway in which this can be done?</p>
<p>I have tried using:</p>
<p>i = Range(&#8220;A5&#8243;).PivotCell.PivotCellType</p>
<p>but it doesn&#8217;t pick up anything different on a subtotal line to a normal line.</p>
<p>Any help would be greatly recieved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alvin</title>
		<link>http://peltiertech.com/WordPress/pivot-table-conditional-formatting-with-vba/comment-page-1/#comment-195002</link>
		<dc:creator>Alvin</dc:creator>
		<pubDate>Thu, 15 Mar 2012 23:57:48 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2534#comment-195002</guid>
		<description>Hello Jon

Thanks for the great tutorial, it has definitely helped with what I am trying to do.   That said I am wondering if it was possible, using this or a similar macro to highlight based on the category name, rather then the value?   

For example, If I was looking to highlight the row based on the Value of BB rather then the value of the BB:a&gt;7 Would I be able to do it?

I&#039;ve tried modifying your script with the lines as a test

   For Each c In .PivotFields(&quot;Category 2&quot;).DataRange.Cells
      If c.Value &gt;= BB Then

but get a Debug error 438, &quot;Object doesn&#039;t support this property or method&quot;
Am I calling the wrong object in this case?

I&#039;m sorry if this is an obvious answer, as I&#039;m still very new to VBA.</description>
		<content:encoded><![CDATA[<p>Hello Jon</p>
<p>Thanks for the great tutorial, it has definitely helped with what I am trying to do.   That said I am wondering if it was possible, using this or a similar macro to highlight based on the category name, rather then the value?   </p>
<p>For example, If I was looking to highlight the row based on the Value of BB rather then the value of the BB:a&gt;7 Would I be able to do it?</p>
<p>I&#8217;ve tried modifying your script with the lines as a test</p>
<p>   For Each c In .PivotFields(&#8220;Category 2&#8243;).DataRange.Cells<br />
      If c.Value &gt;= BB Then</p>
<p>but get a Debug error 438, &#8220;Object doesn&#8217;t support this property or method&#8221;<br />
Am I calling the wrong object in this case?</p>
<p>I&#8217;m sorry if this is an obvious answer, as I&#8217;m still very new to VBA.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/pivot-table-conditional-formatting-with-vba/comment-page-1/#comment-173276</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 13 Jan 2012 20:29:38 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2534#comment-173276</guid>
		<description>Elane -

Using &lt;a href=&quot;http://peltiertech.com/WordPress/referencing-pivot-table-ranges-in-vba/&quot; title=&quot;Referencing Pivot Table Ranges in VBA&quot; rel=&quot;nofollow&quot;&gt;Referencing Pivot Table Ranges in VBA&lt;/a&gt; to find the range with the month, you&#039;ll need a loop something like this (warning: untested):

&lt;pre class=&quot;vbasmall&quot;&gt;&lt;code&gt;For Each cMonth in rMonths.Cells
  Select Case cMonth.Value
    Case &quot;Jan&quot;
      iColor = RGB(0,0,255)
    Case &quot;Feb&quot;
      iColor = RGB(255,255,0)
    Cast &quot;etc.&quot;
      iColor = RGB(blah,blah,blah)
  End Select
  With Intersect(cMonth.EntireRow, .TableRange1)
    .Interior.Color = iColor   
  End With
Next&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Elane -</p>
<p>Using <a href="http://peltiertech.com/WordPress/referencing-pivot-table-ranges-in-vba/" title="Referencing Pivot Table Ranges in VBA" rel="nofollow">Referencing Pivot Table Ranges in VBA</a> to find the range with the month, you&#8217;ll need a loop something like this (warning: untested):</p>
<pre class="vbasmall"><code>For Each cMonth in rMonths.Cells
  Select Case cMonth.Value
    Case "Jan"
      iColor = RGB(0,0,255)
    Case "Feb"
      iColor = RGB(255,255,0)
    Cast "etc."
      iColor = RGB(blah,blah,blah)
  End Select
  With Intersect(cMonth.EntireRow, .TableRange1)
    .Interior.Color = iColor
  End With
Next</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elane</title>
		<link>http://peltiertech.com/WordPress/pivot-table-conditional-formatting-with-vba/comment-page-1/#comment-173063</link>
		<dc:creator>Elane</dc:creator>
		<pubDate>Fri, 13 Jan 2012 05:47:49 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2534#comment-173063</guid>
		<description>hi Jon!
i&#039;d be thankful have help;
Query: 
I&#039;m working on a pivot table of employee salary and I need different CF on each row against each month. e.g. if it&#039;s January then color changes to blue , if february then it gets yellow etc. ...</description>
		<content:encoded><![CDATA[<p>hi Jon!<br />
i&#8217;d be thankful have help;<br />
Query:<br />
I&#8217;m working on a pivot table of employee salary and I need different CF on each row against each month. e.g. if it&#8217;s January then color changes to blue , if february then it gets yellow etc. &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan</title>
		<link>http://peltiertech.com/WordPress/pivot-table-conditional-formatting-with-vba/comment-page-1/#comment-156796</link>
		<dc:creator>Evan</dc:creator>
		<pubDate>Tue, 22 Nov 2011 12:05:54 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2534#comment-156796</guid>
		<description>W.r.t Excel 2007, and probably 2010:
To use conditional formatting, select ONLY the body cells of the pivot table.
If only body range is selected, then under manage rules, New Rule, you will now get an additional &quot;Apply Rules To:&quot; element to the dialog, with &quot;Selected cells&quot; ticked.
Once applied, the conditional formatting will retain through an update.</description>
		<content:encoded><![CDATA[<p>W.r.t Excel 2007, and probably 2010:<br />
To use conditional formatting, select ONLY the body cells of the pivot table.<br />
If only body range is selected, then under manage rules, New Rule, you will now get an additional &#8220;Apply Rules To:&#8221; element to the dialog, with &#8220;Selected cells&#8221; ticked.<br />
Once applied, the conditional formatting will retain through an update.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

