<?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: Alternating Columns</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2005/12/14/alternating-columns/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2005/12/14/alternating-columns/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:28:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Dave</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/12/14/alternating-columns/#comment-17787</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 15 Dec 2005 19:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1302#comment-17787</guid>
		<description>&lt;p&gt;This is the simplest, but less intuitive:&lt;/p&gt;
&lt;p&gt;lStartCol = 1 - lStartCol &lt;/p&gt;
&lt;p&gt;Noodle it in your head a few times to see that it works.  Because it doesn&#039;t jump out at you, this calls for a comment like &quot;toggle between columns 0 and 1?.&lt;/p&gt;
&lt;p&gt;And, yes, I vote for a one-line solution (with comments) over a five-liner.  Unless you&#039;re paid by the line &lt;img class=&quot;wp-smiley&quot; alt=&quot;:)&quot; src=&quot;http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif&quot;&gt; &lt;/p&gt;
&lt;p&gt;I remember helping a junior programmer who had taken over some of my code.  He double-spaced the comments and added all sorts of useless blank lines.  Some times you could only see two lines of code on a screen!  Drove me nuts.&lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This is the simplest, but less intuitive:</p>
<p>lStartCol = 1 &#8211; lStartCol </p>
<p>Noodle it in your head a few times to see that it works.  Because it doesn&#8217;t jump out at you, this calls for a comment like &#8220;toggle between columns 0 and 1?.</p>
<p>And, yes, I vote for a one-line solution (with comments) over a five-liner.  Unless you&#8217;re paid by the line <img class="wp-smiley" alt=":)" src="http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif"/> </p>
<p>I remember helping a junior programmer who had taken over some of my code.  He double-spaced the comments and added all sorts of useless blank lines.  Some times you could only see two lines of code on a screen!  Drove me nuts.</p>
<p>Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/12/14/alternating-columns/#comment-17783</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Thu, 15 Dec 2005 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1302#comment-17783</guid>
		<description>&lt;p&gt;Bill:  I agree.  There&#039;s just something inside me that hates to &quot;waste&quot; five lines when one will do the job.  I can&#039;t seem to remember that VBA line are free.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Bill:  I agree.  There&#8217;s just something inside me that hates to &#8220;waste&#8221; five lines when one will do the job.  I can&#8217;t seem to remember that VBA line are free.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/12/14/alternating-columns/#comment-17784</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Thu, 15 Dec 2005 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1302#comment-17784</guid>
		<description>&lt;p&gt;Andy: Yes, that should have been .Offset(0,lStartCol)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Andy: Yes, that should have been .Offset(0,lStartCol)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billkamm</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/12/14/alternating-columns/#comment-17780</link>
		<dc:creator>Billkamm</dc:creator>
		<pubDate>Thu, 15 Dec 2005 14:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1302#comment-17780</guid>
		<description>&lt;p&gt;In all honesty Dick the &quot;cop out&quot; would probably be the best, because it is easier to understand to someone else who might be reading your code.&lt;/p&gt;
&lt;p&gt;I would take readability of ingenuity anyday and for those who say &quot;no one else will ever see this code&quot; have to remember that you one day may wish to go back and look at your code and be confused.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>In all honesty Dick the &#8220;cop out&#8221; would probably be the best, because it is easier to understand to someone else who might be reading your code.</p>
<p>I would take readability of ingenuity anyday and for those who say &#8220;no one else will ever see this code&#8221; have to remember that you one day may wish to go back and look at your code and be confused.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Pope</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/12/14/alternating-columns/#comment-17777</link>
		<dc:creator>Andy Pope</dc:creator>
		<pubDate>Thu, 15 Dec 2005 09:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1302#comment-17777</guid>
		<description>&lt;p&gt;Hi Dick,&lt;/p&gt;
&lt;p&gt;Is that not a Row offset you have used?&lt;/p&gt;
&lt;p&gt;rCell.Offset(lStartCol, 0).Value = &quot;Some number&quot;&lt;/p&gt;
&lt;p&gt;Here is an example you your newly discovered NOT knowledge.&lt;br&gt;
Sub AlternateCols()&lt;/p&gt;
&lt;p&gt;    Dim rCell As Range&lt;br&gt;
    Dim lngCol As Long&lt;/p&gt;
&lt;p&gt;    &#039; odd row start&lt;br&gt;
    For Each rCell In Range(&quot;A1:A10?)&lt;br&gt;
        lngCol = Not lngCol&lt;br&gt;
        rCell.Offset(0, 1 + lngCol) = rCell.Address&lt;br&gt;
    Next&lt;/p&gt;
&lt;p&gt;    &#039; even row start&lt;br&gt;
    lngCol = 0&lt;br&gt;
    For Each rCell In Range(&quot;A20:A30?)&lt;br&gt;
        lngCol = Not lngCol&lt;br&gt;
        rCell.Offset(0, 1 + lngCol) = rCell.Address&lt;br&gt;
    Next&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Dick,</p>
<p>Is that not a Row offset you have used?</p>
<p>rCell.Offset(lStartCol, 0).Value = &#8220;Some number&#8221;</p>
<p>Here is an example you your newly discovered NOT knowledge.<br />
Sub AlternateCols()</p>
<p>    Dim rCell As Range<br />
    Dim lngCol As Long</p>
<p>    &#8216; odd row start<br />
    For Each rCell In Range(&#8220;A1:A10?)<br />
        lngCol = Not lngCol<br />
        rCell.Offset(0, 1 + lngCol) = rCell.Address<br />
    Next</p>
<p>    &#8216; even row start<br />
    lngCol = 0<br />
    For Each rCell In Range(&#8220;A20:A30?)<br />
        lngCol = Not lngCol<br />
        rCell.Offset(0, 1 + lngCol) = rCell.Address<br />
    Next</p>
<p>End Sub</p>
]]></content:encoded>
	</item>
</channel>
</rss>

