<?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 Rows with Data in a Macro</title>
	<atom:link href="http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/feed/" rel="self" type="application/rss+xml" />
	<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/</link>
	<description>Excel Tips and Tricks for All Levels</description>
	<lastBuildDate>Thu, 05 Apr 2012 00:18:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Philip Pointer</title>
		<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/comment-page-1/#comment-1532</link>
		<dc:creator>Philip Pointer</dc:creator>
		<pubDate>Tue, 12 Jul 2011 15:10:26 +0000</pubDate>
		<guid isPermaLink="false">http://excelhints.com/?p=324#comment-1532</guid>
		<description>Works perfectly.  Thanks so much!</description>
		<content:encoded><![CDATA[<p>Works perfectly.  Thanks so much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve S</title>
		<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/comment-page-1/#comment-1459</link>
		<dc:creator>Steve S</dc:creator>
		<pubDate>Mon, 18 Apr 2011 15:05:01 +0000</pubDate>
		<guid isPermaLink="false">http://excelhints.com/?p=324#comment-1459</guid>
		<description>Was able to answer my own question, using concatenate feature...

Range(&quot;D34:D&quot; &amp; RowCount)</description>
		<content:encoded><![CDATA[<p>Was able to answer my own question, using concatenate feature&#8230;</p>
<p>Range(&#8220;D34:D&#8221; &amp; RowCount)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve S</title>
		<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/comment-page-1/#comment-1458</link>
		<dc:creator>Steve S</dc:creator>
		<pubDate>Fri, 15 Apr 2011 22:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://excelhints.com/?p=324#comment-1458</guid>
		<description>John - I found this page via a Google search and your &quot;RowCount&quot; code was EXACTLY what I was looking for and worked perfectly.

Question:  I now want to use &#039;RowCount&#039; to call out the length of an auto-fill function.  For example, when I recorded the macro, I only autofilled from D34 to D41, but now I want to modify the macro to be D34 to D&#039;RowCount&#039; so that no matter how many rows my different files have, it will always fill down to the last row.

Can you tell me how to do this?

Thanks!</description>
		<content:encoded><![CDATA[<p>John &#8211; I found this page via a Google search and your &#8220;RowCount&#8221; code was EXACTLY what I was looking for and worked perfectly.</p>
<p>Question:  I now want to use &#8216;RowCount&#8217; to call out the length of an auto-fill function.  For example, when I recorded the macro, I only autofilled from D34 to D41, but now I want to modify the macro to be D34 to D&#8217;RowCount&#8217; so that no matter how many rows my different files have, it will always fill down to the last row.</p>
<p>Can you tell me how to do this?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ribs</title>
		<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/comment-page-1/#comment-1092</link>
		<dc:creator>ribs</dc:creator>
		<pubDate>Fri, 30 Apr 2010 17:37:34 +0000</pubDate>
		<guid isPermaLink="false">http://excelhints.com/?p=324#comment-1092</guid>
		<description>Thanks John,  it turns out what I needed to work with were the Pane, FreezePane, Split, and SplitRows properties</description>
		<content:encoded><![CDATA[<p>Thanks John,  it turns out what I needed to work with were the Pane, FreezePane, Split, and SplitRows properties</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/comment-page-1/#comment-1089</link>
		<dc:creator>john</dc:creator>
		<pubDate>Thu, 29 Apr 2010 17:27:02 +0000</pubDate>
		<guid isPermaLink="false">http://excelhints.com/?p=324#comment-1089</guid>
		<description>Hi Ribs - you could try =COUNTA(A1:C1).  Let me know if that&#039;s not what you&#039;re looking for.</description>
		<content:encoded><![CDATA[<p>Hi Ribs &#8211; you could try =COUNTA(A1:C1).  Let me know if that&#8217;s not what you&#8217;re looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ribs</title>
		<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/comment-page-1/#comment-1088</link>
		<dc:creator>ribs</dc:creator>
		<pubDate>Thu, 29 Apr 2010 16:05:30 +0000</pubDate>
		<guid isPermaLink="false">http://excelhints.com/?p=324#comment-1088</guid>
		<description>I&#039;m trying to import spreadsheets that contain a number of fixed heading rows, the number of fixed headings varies from spreadsheet to spreadsheet.   How do I determine how many fixed heading rows there are on a spreadsheet?  I&#039;ve tried using  myRange.CurrentRegion.ListHeaderRows  but that always returns 0</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to import spreadsheets that contain a number of fixed heading rows, the number of fixed headings varies from spreadsheet to spreadsheet.   How do I determine how many fixed heading rows there are on a spreadsheet?  I&#8217;ve tried using  myRange.CurrentRegion.ListHeaderRows  but that always returns 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/comment-page-1/#comment-1052</link>
		<dc:creator>john</dc:creator>
		<pubDate>Sat, 13 Feb 2010 14:57:38 +0000</pubDate>
		<guid isPermaLink="false">http://excelhints.com/?p=324#comment-1052</guid>
		<description>Hi Claire, check out this page (http://www.contextures.com/xlFunctions04.html)... there is a note at the bottom of the counta section that might apply to you. Hopefully that helps.  If that is the case, maybe a countif formula would work better for you.</description>
		<content:encoded><![CDATA[<p>Hi Claire, check out this page (<a href="http://www.contextures.com/xlFunctions04.html" rel="nofollow">http://www.contextures.com/xlFunctions04.html</a>)&#8230; there is a note at the bottom of the counta section that might apply to you. Hopefully that helps.  If that is the case, maybe a countif formula would work better for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: claire</title>
		<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/comment-page-1/#comment-1051</link>
		<dc:creator>claire</dc:creator>
		<pubDate>Sat, 13 Feb 2010 11:34:51 +0000</pubDate>
		<guid isPermaLink="false">http://excelhints.com/?p=324#comment-1051</guid>
		<description>I am using counta to count cells that have text in but it is counting the blank cells as well.

I have data in 5 of the 34 cells and the rest are blank so my sum is
=counta(b2:al2) but the answer is 34.
What am I doing wrong.

Thanks
Claire</description>
		<content:encoded><![CDATA[<p>I am using counta to count cells that have text in but it is counting the blank cells as well.</p>
<p>I have data in 5 of the 34 cells and the rest are blank so my sum is<br />
=counta(b2:al2) but the answer is 34.<br />
What am I doing wrong.</p>
<p>Thanks<br />
Claire</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/comment-page-1/#comment-867</link>
		<dc:creator>john</dc:creator>
		<pubDate>Thu, 10 Sep 2009 19:48:14 +0000</pubDate>
		<guid isPermaLink="false">http://excelhints.com/?p=324#comment-867</guid>
		<description>Hmmm... I&#039;m still not sure why that didn&#039;t work.  I did the following in 2003 and it worked fine:

Sub counta()
    Sheets(&quot;sheet1&quot;).Select
    RowCount = Application.WorksheetFunction.counta(Range(&quot;A:A&quot;))
    MsgBox (RowCount)
End Sub

You could also try something like the following which will select rows 2 through the end of the data in Column A:

Sub selectData()
    RowCount = Range(&quot;A65536&quot;).End(xlUp).Row
    Range(&quot;A2:A&quot; &amp; RowCount).Select
End Sub

Good job finding a solution that worked for you though.</description>
		<content:encoded><![CDATA[<p>Hmmm&#8230; I&#8217;m still not sure why that didn&#8217;t work.  I did the following in 2003 and it worked fine:</p>
<p>Sub counta()<br />
    Sheets(&#8220;sheet1&#8243;).Select<br />
    RowCount = Application.WorksheetFunction.counta(Range(&#8220;A:A&#8221;))<br />
    MsgBox (RowCount)<br />
End Sub</p>
<p>You could also try something like the following which will select rows 2 through the end of the data in Column A:</p>
<p>Sub selectData()<br />
    RowCount = Range(&#8220;A65536&#8243;).End(xlUp).Row<br />
    Range(&#8220;A2:A&#8221; &#038; RowCount).Select<br />
End Sub</p>
<p>Good job finding a solution that worked for you though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://excelhints.com/2008/10/16/count-rows-with-data-in-a-macro/comment-page-1/#comment-866</link>
		<dc:creator>john</dc:creator>
		<pubDate>Thu, 10 Sep 2009 17:56:39 +0000</pubDate>
		<guid isPermaLink="false">http://excelhints.com/?p=324#comment-866</guid>
		<description>I got it working.  The function didn&#039;t seem to like calling out the columns, so I created variables to work around it.  Here&#039;s what I ended up using.  I&#039;m a bit of a novice and am learning as I go, so I&#039;m sure there&#039;s a more elegant solution...

    Set MyRange = Sheets(&quot;Oracle&quot;).Range(&quot;A:A&quot;)
    LastRow = Application.WorksheetFunction.CountA(MyRange)
    Klast = &quot;K&quot; &amp; LastRow
    Krange = &quot;K2:&quot; &amp; Klast
    Range(&quot;K2&quot;).Select
    Selection.AutoFill Destination:=Range(Krange)</description>
		<content:encoded><![CDATA[<p>I got it working.  The function didn&#8217;t seem to like calling out the columns, so I created variables to work around it.  Here&#8217;s what I ended up using.  I&#8217;m a bit of a novice and am learning as I go, so I&#8217;m sure there&#8217;s a more elegant solution&#8230;</p>
<p>    Set MyRange = Sheets(&#8220;Oracle&#8221;).Range(&#8220;A:A&#8221;)<br />
    LastRow = Application.WorksheetFunction.CountA(MyRange)<br />
    Klast = &#8220;K&#8221; &amp; LastRow<br />
    Krange = &#8220;K2:&#8221; &amp; Klast<br />
    Range(&#8220;K2&#8243;).Select<br />
    Selection.AutoFill Destination:=Range(Krange)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

