 




<?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: format cell based on contents using VB</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/format-cell-based-on-contents-using-vb/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/format-cell-based-on-contents-using-vb/</link>
	<description></description>
	<lastBuildDate>Sat, 25 May 2013 16:01:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/format-cell-based-on-contents-using-vb/#comment-75282</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Mon, 29 Mar 2010 14:25:40 +0000</pubDate>
		<guid isPermaLink="false">#comment-75282</guid>
		<description><![CDATA[Hi Usmcjcr.

You could use this code (&lt;b&gt;this is not a formula, it is VBA code&lt;/b&gt;):

&lt;pre&gt;Private Sub Worksheet_Change(ByVal Target As Range)
    If StrConv(Target.Value, vbUpperCase) = &quot;X&quot; Then
        Target.Interior.ColorIndex = 6
    End If
End Sub&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Hi Usmcjcr.</p>
<p>You could use this code (<b>this is not a formula, it is VBA code</b>):</p>
<pre>Private Sub Worksheet_Change(ByVal Target As Range)
    If StrConv(Target.Value, vbUpperCase) = "X" Then
        Target.Interior.ColorIndex = 6
    End If
End Sub</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: usmcjcr</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/format-cell-based-on-contents-using-vb/#comment-75267</link>
		<dc:creator>usmcjcr</dc:creator>
		<pubDate>Sun, 28 Mar 2010 14:09:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-75267</guid>
		<description><![CDATA[I&#039;m using Excel 2003.  I&#039;ve tried your advice - no luck.  My situation: When I place an &quot;x&quot; into an empty cell I want that cell to turn Yellow.  Following your suggestion here is how I wrote the formula:

=Cells(ActiveCell.Row, x).Interior.ColorIndex = 6 &#039;Yellow

Jim
usmc_jcr@yahoo.com]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m using Excel 2003.  I&#8217;ve tried your advice &#8211; no luck.  My situation: When I place an &#8220;x&#8221; into an empty cell I want that cell to turn Yellow.  Following your suggestion here is how I wrote the formula:</p>
<p>=Cells(ActiveCell.Row, x).Interior.ColorIndex = 6 &#8216;Yellow</p>
<p>Jim<br />
<a href="mailto:usmc_jcr@yahoo.com">usmc_jcr@yahoo.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: voicetec</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/format-cell-based-on-contents-using-vb/#comment-65536</link>
		<dc:creator>voicetec</dc:creator>
		<pubDate>Wed, 15 Jul 2009 09:57:15 +0000</pubDate>
		<guid isPermaLink="false">#comment-65536</guid>
		<description><![CDATA[hi thanks for this but it isn&#039;t what i was looking for..this code seems to automatically colour the cells without any input?..is that how it should work?

What i want is for when i insert a code into each cell in a specified col the cell colur changes depending on the input.

e.g say all my codes will be in col b
now in row 1 col b i insert =2 (the cell color changes to red)
in row 2 col b i insert =12 (the cell color changes to blue) etc

the color is dependent on the range i.e 1 to 10 = red, 11 to 20 = blue etc

is this making sense?]]></description>
		<content:encoded><![CDATA[<p>hi thanks for this but it isn&#8217;t what i was looking for..this code seems to automatically colour the cells without any input?..is that how it should work?</p>
<p>What i want is for when i insert a code into each cell in a specified col the cell colur changes depending on the input.</p>
<p>e.g say all my codes will be in col b<br />
now in row 1 col b i insert =2 (the cell color changes to red)<br />
in row 2 col b i insert =12 (the cell color changes to blue) etc</p>
<p>the color is dependent on the range i.e 1 to 10 = red, 11 to 20 = blue etc</p>
<p>is this making sense?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.022 seconds using memcached
Object Caching 295/301 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-25 16:02:09 -->