<?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: Conditionally Formatting Number Format</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/06/21/conditionally-formatting-number-format/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/06/21/conditionally-formatting-number-format/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Brett</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/21/conditionally-formatting-number-format/#comment-29374</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Thu, 13 Dec 2007 13:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=643#comment-29374</guid>
		<description>&lt;p&gt;Rachel,&lt;/p&gt;
&lt;p&gt;    The preceeding code, with the usual logic operators in place of the lessthansign and equalsign, changes the fill color of A1 based on the value of A1 when the sheet calcs. Reference A2 from A1 and enter values in A2. A1 should change fill color. You can add cases.&lt;/p&gt;
&lt;p&gt;Brett&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Rachel,</p>
<p>    The preceeding code, with the usual logic operators in place of the lessthansign and equalsign, changes the fill color of A1 based on the value of A1 when the sheet calcs. Reference A2 from A1 and enter values in A2. A1 should change fill color. You can add cases.</p>
<p>Brett</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brett</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/21/conditionally-formatting-number-format/#comment-29373</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Thu, 13 Dec 2007 13:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=643#comment-29373</guid>
		<description>&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; Worksheet_Calculate()&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; MyColor &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Integer&lt;/span&gt;&lt;br&gt;
MyColor equalsign 0&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt; Me.Range(&lt;span class=&quot;st0&quot;&gt;&quot;a1&quot;&lt;/span&gt;)&lt;br&gt;
&#160;&lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; IsError(.Value) &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Exit&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;Select&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Case&lt;/span&gt; .Value&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Case&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Is&lt;/span&gt; lessthansign 1&lt;br&gt;
&#160; &#160; &#160; &#160;MyColor equalsign 3&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Case&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Is&lt;/span&gt; lessthansign 2&lt;br&gt;
&#160; &#160; &#160; &#160;MyColor equalsign 5&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Case&lt;/span&gt; 3&lt;br&gt;
&#160; &#160; &#160; &#160;MyColor equalsign 7&lt;br&gt;
&#160; &#160;&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Select&lt;/span&gt;&lt;br&gt;
.Interior.ColorIndex equalsign MyColor&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Private</span> <span class="kw1">Sub</span> Worksheet_Calculate()<br />
<span class="kw1">Dim</span> MyColor <span class="kw1">As</span> <span class="kw1">Integer</span><br />
MyColor equalsign 0<br />
<span class="kw1">With</span> Me.Range(<span class="st0">&#8220;a1&#8243;</span>)<br />
&nbsp;<span class="kw1">If</span> IsError(.Value) <span class="kw1">Then</span> <span class="kw1">Exit</span> <span class="kw1">Sub</span><br />
&nbsp; <span class="kw1">Select</span> <span class="kw1">Case</span> .Value<br />
&nbsp; &nbsp; <span class="kw1">Case</span> <span class="kw1">Is</span> lessthansign 1<br />
&nbsp; &nbsp; &nbsp; &nbsp;MyColor equalsign 3<br />
&nbsp; &nbsp; <span class="kw1">Case</span> <span class="kw1">Is</span> lessthansign 2<br />
&nbsp; &nbsp; &nbsp; &nbsp;MyColor equalsign 5<br />
&nbsp; &nbsp; <span class="kw1">Case</span> 3<br />
&nbsp; &nbsp; &nbsp; &nbsp;MyColor equalsign 7<br />
&nbsp; &nbsp;<span class="kw1">End</span> <span class="kw1">Select</span><br />
.Interior.ColorIndex equalsign MyColor<br />
<span class="kw1">End</span> <span class="kw1">With</span><br />
<span class="kw1">End</span> <span class="kw1">Sub</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/21/conditionally-formatting-number-format/#comment-29351</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Wed, 12 Dec 2007 16:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=643#comment-29351</guid>
		<description>&lt;p&gt;Brett:  Code in the comments has a few bugs in it.  Eliminate all blank lines in your code - just put a single space.  Also, make sure you close the VB tag with a slash, not a backslash.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Brett:  Code in the comments has a few bugs in it.  Eliminate all blank lines in your code &#8211; just put a single space.  Also, make sure you close the VB tag with a slash, not a backslash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brett</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/21/conditionally-formatting-number-format/#comment-29343</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Wed, 12 Dec 2007 02:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=643#comment-29343</guid>
		<description>&lt;p&gt;Rachel,&lt;/p&gt;
&lt;p&gt;&lt;code lang=&quot;vb&quot;&gt;&lt;/code&gt;&lt;/p&gt;
&lt;code lang=&quot;vb&quot;&gt;
&lt;p&gt;Private Sub Worksheet_Calculate()&lt;br&gt;
 Dim MyColor As Integer&lt;br&gt;
  MyColor = 0&lt;/p&gt;
&lt;p&gt;  With Me.Range(&quot;a1&quot;)&lt;/p&gt;
&lt;p&gt;        If IsError(.Value) Then Exit Sub&lt;/p&gt;
&lt;p&gt;        Select Case .Value&lt;br&gt;
             Case Is&lt;/p&gt;&lt;/code&gt;
&lt;p&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Rachel,</p>
<p><div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;</div></div>
</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;p&gt;<span style="color: #E56717; font-weight: bold;">Private</span> <span style="color: #E56717; font-weight: bold;">Sub</span> Worksheet_Calculate()&lt;br&gt;<br />
&nbsp;<span style="color: #151B8D; font-weight: bold;">Dim</span> MyColor <span style="color: #151B8D; font-weight: bold;">As</span> Integer&lt;br&gt;<br />
&nbsp; MyColor = 0&lt;/p&gt;<br />
&lt;p&gt; &nbsp;<span style="color: #8D38C9; font-weight: bold;">With</span> Me.Range(<span style="color: #800000;">&quot;a1&quot;</span>)&lt;/p&gt;<br />
&lt;p&gt; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">If</span> IsError(.Value) <span style="color: #8D38C9; font-weight: bold;">Then</span> <span style="color: #E56717; font-weight: bold;">Exit</span> Sub&lt;/p&gt;<br />
&lt;p&gt; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">Select</span> <span style="color: #8D38C9; font-weight: bold;">Case</span> .Value&lt;br&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">Case</span> Is&lt;/p&gt;</div></div></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brett</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/21/conditionally-formatting-number-format/#comment-29342</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Wed, 12 Dec 2007 02:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=643#comment-29342</guid>
		<description>&lt;p&gt;Rachel,&lt;/p&gt;
&lt;p&gt;   &lt;code lang=&quot;vb&quot;&gt;&lt;br&gt;
Private Sub Worksheet_Calculate()&lt;br&gt;
 Dim MyColor As Integer&lt;br&gt;
  MyColor = 0&lt;/code&gt;&lt;/p&gt;
&lt;code lang=&quot;vb&quot;&gt;
&lt;p&gt;  With Me.Range(&quot;a1&quot;)&lt;/p&gt;
&lt;p&gt;        If IsError(.Value) Then Exit Sub&lt;/p&gt;
&lt;p&gt;        Select Case .Value&lt;br&gt;
             Case Is&lt;/p&gt;&lt;/code&gt;
&lt;p&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Rachel,</p>
<p><div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;br&gt;<br />
<span style="color: #E56717; font-weight: bold;">Private</span> <span style="color: #E56717; font-weight: bold;">Sub</span> Worksheet_Calculate()&lt;br&gt;<br />
&nbsp;<span style="color: #151B8D; font-weight: bold;">Dim</span> MyColor <span style="color: #151B8D; font-weight: bold;">As</span> Integer&lt;br&gt;<br />
&nbsp; MyColor = 0</div></div>
</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;p&gt; &nbsp;<span style="color: #8D38C9; font-weight: bold;">With</span> Me.Range(<span style="color: #800000;">&quot;a1&quot;</span>)&lt;/p&gt;<br />
&lt;p&gt; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">If</span> IsError(.Value) <span style="color: #8D38C9; font-weight: bold;">Then</span> <span style="color: #E56717; font-weight: bold;">Exit</span> Sub&lt;/p&gt;<br />
&lt;p&gt; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">Select</span> <span style="color: #8D38C9; font-weight: bold;">Case</span> .Value&lt;br&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #8D38C9; font-weight: bold;">Case</span> Is&lt;/p&gt;</div></div></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rachel</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/21/conditionally-formatting-number-format/#comment-29310</link>
		<dc:creator>Rachel</dc:creator>
		<pubDate>Mon, 10 Dec 2007 20:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=643#comment-29310</guid>
		<description>&lt;p&gt;Can you do the same with the cell pattern? For example, if the cell&#039;s value is 1 or less, the cell is formatted as red background. If the cell&#039;s value is 2 or less, the cell is formatted as blue background. If the cell&#039;s value is 3-8, a different pattern for each value. I think it&#039;s a worksheet_calculate code, but just can&#039;t get it to behave.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Can you do the same with the cell pattern? For example, if the cell&#8217;s value is 1 or less, the cell is formatted as red background. If the cell&#8217;s value is 2 or less, the cell is formatted as blue background. If the cell&#8217;s value is 3-8, a different pattern for each value. I think it&#8217;s a worksheet_calculate code, but just can&#8217;t get it to behave.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Rynd</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/06/21/conditionally-formatting-number-format/#comment-1787</link>
		<dc:creator>Jonathan Rynd</dc:creator>
		<pubDate>Tue, 22 Jun 2004 18:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=643#comment-1787</guid>
		<description>&lt;p&gt;There&#039;s a much simpler way to do this without any VBA.  Set the number format of the cell to:&lt;/p&gt;
&lt;p&gt;[&lt;-1]#,##0.00;[&lt;=1]0.00%;#,##0.00&lt;/p&gt;
&lt;p&gt;It&#039;s not as flexible as Conditional Formatting or VBA, but it&#039;s a lot simpler.&lt;/p&gt;
&lt;p&gt;The format is:&lt;br&gt;
[Condition]Number format;[Condition]Number format;Default number format&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>There&#8217;s a much simpler way to do this without any VBA.  Set the number format of the cell to:</p>
<p>[&lt;-1]#,##0.00;[&lt;=1]0.00%;#,##0.00</p>
<p>It&#8217;s not as flexible as Conditional Formatting or VBA, but it&#8217;s a lot simpler.</p>
<p>The format is:<br />
[Condition]Number format;[Condition]Number format;Default number format</p>
]]></content:encoded>
	</item>
</channel>
</rss>

