<?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: Count Bold Cells in a Range</title>
	<atom:link href="http://peltiertech.com/WordPress/count-bold-cells-in-a-range/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress/count-bold-cells-in-a-range/</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Thu, 18 Mar 2010 05:36:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</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/count-bold-cells-in-a-range/comment-page-1/#comment-25834</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 22 Jan 2010 16:03:44 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=721#comment-25834</guid>
		<description>Anon - I would be reluctant to tie up the processor like that.</description>
		<content:encoded><![CDATA[<p>Anon &#8211; I would be reluctant to tie up the processor like that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anon</title>
		<link>http://peltiertech.com/WordPress/count-bold-cells-in-a-range/comment-page-1/#comment-25829</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Fri, 22 Jan 2010 14:40:02 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=721#comment-25829</guid>
		<description>what about a query that runs every second to count the formatted stuff.
Would that work?</description>
		<content:encoded><![CDATA[<p>what about a query that runs every second to count the formatted stuff.<br />
Would that work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/count-bold-cells-in-a-range/comment-page-1/#comment-20365</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Sat, 10 Oct 2009 05:00:49 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=721#comment-20365</guid>
		<description>Adam -

The formatting recognized by VBA is the formatting applied to the cell in the absence of any conditional formatting being turned on. It is possible to write your function so that it also checks the condition, and returns the formatting for that condition. You can either hard code this, or write code to examine the conditions for each cell, and determine which apply, and then extract the formatting, then count the cells.

Did I make it sound complicated? It&#039;s even more complicated than that. I wish I could tell you otherwise.</description>
		<content:encoded><![CDATA[<p>Adam -</p>
<p>The formatting recognized by VBA is the formatting applied to the cell in the absence of any conditional formatting being turned on. It is possible to write your function so that it also checks the condition, and returns the formatting for that condition. You can either hard code this, or write code to examine the conditions for each cell, and determine which apply, and then extract the formatting, then count the cells.</p>
<p>Did I make it sound complicated? It&#8217;s even more complicated than that. I wish I could tell you otherwise.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://peltiertech.com/WordPress/count-bold-cells-in-a-range/comment-page-1/#comment-20357</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Fri, 09 Oct 2009 23:21:29 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=721#comment-20357</guid>
		<description>OK, got this. Evidently Excel will not run User Defined Functions, unless you enable macros, and play with the security a little. I&#039;m over that, and have this working.

However, the function counts cells correctly if they are bold.

But, if I have Conditional Formatting set, that makes a particular cell BOLD because it fits some criteria, that cell will NOT be counted by this function.

Any thoughts?

Thanks,

Adam</description>
		<content:encoded><![CDATA[<p>OK, got this. Evidently Excel will not run User Defined Functions, unless you enable macros, and play with the security a little. I&#8217;m over that, and have this working.</p>
<p>However, the function counts cells correctly if they are bold.</p>
<p>But, if I have Conditional Formatting set, that makes a particular cell BOLD because it fits some criteria, that cell will NOT be counted by this function.</p>
<p>Any thoughts?</p>
<p>Thanks,</p>
<p>Adam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://peltiertech.com/WordPress/count-bold-cells-in-a-range/comment-page-1/#comment-20351</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Fri, 09 Oct 2009 21:55:15 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=721#comment-20351</guid>
		<description>Jon,

I&#039;m having the same problem that Anna had above, namely that I get a response of &quot;#NAME?&quot;

I have followed your link about how to use someone else&#039;s macro, but that doesn&#039;t really apply, as this is a function.

Here&#039;s what I&#039;m doing:

I created the Function, and alt-Q to save it. I then went into a cell, and started to type &quot;=countbold&quot;, and the whole function name appeared for me to select. I selected it, and put in a range, and got the &quot;#NAME?&quot; error.

Any help would be greatly appreciated.

I&#039;m using Excel 2007, if that&#039;s relevant.

Thank you,

ADam</description>
		<content:encoded><![CDATA[<p>Jon,</p>
<p>I&#8217;m having the same problem that Anna had above, namely that I get a response of &#8220;#NAME?&#8221;</p>
<p>I have followed your link about how to use someone else&#8217;s macro, but that doesn&#8217;t really apply, as this is a function.</p>
<p>Here&#8217;s what I&#8217;m doing:</p>
<p>I created the Function, and alt-Q to save it. I then went into a cell, and started to type &#8220;=countbold&#8221;, and the whole function name appeared for me to select. I selected it, and put in a range, and got the &#8220;#NAME?&#8221; error.</p>
<p>Any help would be greatly appreciated.</p>
<p>I&#8217;m using Excel 2007, if that&#8217;s relevant.</p>
<p>Thank you,</p>
<p>ADam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/count-bold-cells-in-a-range/comment-page-1/#comment-13110</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Mon, 13 Apr 2009 18:27:21 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=721#comment-13110</guid>
		<description>Application.Volatile forces a calculation of a UDF whenever the sheet recalculates. It&#039;s not necessary in this formula, since any change or calculation in the cells referenced by the formula will cause recalculation of the UDF anyway. However, changing a format does not invoke a recalculation, so the calculated value will not change if all you are doing is clicking buttons or using a dialog to change formatting. You need to change a value or recalculate the sheet to update the formula result.</description>
		<content:encoded><![CDATA[<p>Application.Volatile forces a calculation of a UDF whenever the sheet recalculates. It&#8217;s not necessary in this formula, since any change or calculation in the cells referenced by the formula will cause recalculation of the UDF anyway. However, changing a format does not invoke a recalculation, so the calculated value will not change if all you are doing is clicking buttons or using a dialog to change formatting. You need to change a value or recalculate the sheet to update the formula result.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak Nayak</title>
		<link>http://peltiertech.com/WordPress/count-bold-cells-in-a-range/comment-page-1/#comment-13106</link>
		<dc:creator>Deepak Nayak</dc:creator>
		<pubDate>Mon, 13 Apr 2009 16:20:52 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=721#comment-13106</guid>
		<description>Hi Jon,

Tried the &#039;Application.Volatile&#039; part, but the values in the worksheet have not become dynamic.
-=-=-=-=-=-=-=-=-=-=-
Function CountBoldCellsInRange(rng As Range) As Long
  Application.Volatile

  Dim rCell As Range
  Dim iBold As Long

  iBold = 0
  For Each rCell In rng
    If rCell.Font.Bold Then
      iBold = iBold + 1
    End If
  Next

  CountBoldCellsInRange = iBold
End Function
-=-=-=-=-=-=-=-=-=-=-
What am I doing wrong here?

Regards,
Deepak</description>
		<content:encoded><![CDATA[<p>Hi Jon,</p>
<p>Tried the &#8216;Application.Volatile&#8217; part, but the values in the worksheet have not become dynamic.<br />
-=-=-=-=-=-=-=-=-=-=-<br />
Function CountBoldCellsInRange(rng As Range) As Long<br />
  Application.Volatile</p>
<p>  Dim rCell As Range<br />
  Dim iBold As Long</p>
<p>  iBold = 0<br />
  For Each rCell In rng<br />
    If rCell.Font.Bold Then<br />
      iBold = iBold + 1<br />
    End If<br />
  Next</p>
<p>  CountBoldCellsInRange = iBold<br />
End Function<br />
-=-=-=-=-=-=-=-=-=-=-<br />
What am I doing wrong here?</p>
<p>Regards,<br />
Deepak</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/count-bold-cells-in-a-range/comment-page-1/#comment-6114</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Wed, 12 Nov 2008 15:56:06 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=721#comment-6114</guid>
		<description>Anna -

#NAME? means that Excel doesn&#039;t recognize CountBoldCellsInRange. Did you place the function into a regular code module? Follow the protocol in &lt;a href=&quot;http://peltiertech.com/WordPress/2008/03/09/how-to-use-someone-elses-macro/&quot; title=&quot;How To: Use Someone Else&#039;s Macro&quot; rel=&quot;nofollow&quot;&gt;How To: Use Someone Else’s Macro&lt;/a&gt; to make sure you are implementing the function properly. (I usually remember to include a link to that tutorial, but I forgot. My bad.)</description>
		<content:encoded><![CDATA[<p>Anna -</p>
<p>#NAME? means that Excel doesn&#8217;t recognize CountBoldCellsInRange. Did you place the function into a regular code module? Follow the protocol in <a href="http://peltiertech.com/WordPress/2008/03/09/how-to-use-someone-elses-macro/" title="How To: Use Someone Else's Macro" rel="nofollow">How To: Use Someone Else’s Macro</a> to make sure you are implementing the function properly. (I usually remember to include a link to that tutorial, but I forgot. My bad.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anna M.</title>
		<link>http://peltiertech.com/WordPress/count-bold-cells-in-a-range/comment-page-1/#comment-6113</link>
		<dc:creator>Anna M.</dc:creator>
		<pubDate>Wed, 12 Nov 2008 14:41:50 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=721#comment-6113</guid>
		<description>I added the line write into the worksheet cell and i am not doing something correct.  I am getting an error

=CountBoldCellsInRange(AJ5:AJ7)

#NAME?

Not sure why this is not working</description>
		<content:encoded><![CDATA[<p>I added the line write into the worksheet cell and i am not doing something correct.  I am getting an error</p>
<p>=CountBoldCellsInRange(AJ5:AJ7)</p>
<p>#NAME?</p>
<p>Not sure why this is not working</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/count-bold-cells-in-a-range/comment-page-1/#comment-5935</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Mon, 03 Nov 2008 18:58:47 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=721#comment-5935</guid>
		<description>Microsoft has been trying since Excel 5/95 to deprecate XLM. They can&#039;t for two reasons. 1 - a lot of business solutions were coded in XLM and companies would refuse to upgrade rather than rewrite these in VBA. 2 - a certain number of things can be done using XLM which are not possible in VBA. Until Microsoft addresses these two items, they will have to support XLM.

However, the Microsoft efforts to de-emphasize XLM have been successful, in that few who picked up Excel at or after Excel 5/95 have been exposed to XLM. Those of us who learned XLM before VBA have forgotten most of the XLM we ever knew. 

If the Get.Cell XLM functions could be incorporated into Excel&#039;s library of worksheet functions, it would go a long way toward their goal of making XLM unnecessary.</description>
		<content:encoded><![CDATA[<p>Microsoft has been trying since Excel 5/95 to deprecate XLM. They can&#8217;t for two reasons. 1 &#8211; a lot of business solutions were coded in XLM and companies would refuse to upgrade rather than rewrite these in VBA. 2 &#8211; a certain number of things can be done using XLM which are not possible in VBA. Until Microsoft addresses these two items, they will have to support XLM.</p>
<p>However, the Microsoft efforts to de-emphasize XLM have been successful, in that few who picked up Excel at or after Excel 5/95 have been exposed to XLM. Those of us who learned XLM before VBA have forgotten most of the XLM we ever knew. </p>
<p>If the Get.Cell XLM functions could be incorporated into Excel&#8217;s library of worksheet functions, it would go a long way toward their goal of making XLM unnecessary.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
