<?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: AutoFill Macro</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2005/10/18/autofill-macro/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2005/10/18/autofill-macro/</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: Arshad</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/18/autofill-macro/#comment-31064</link>
		<dc:creator>Arshad</dc:creator>
		<pubDate>Mon, 03 Mar 2008 09:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1261#comment-31064</guid>
		<description>&lt;p&gt;Hello Members,&lt;/p&gt;
&lt;p&gt;I have a question for how to create a macro in Excel for below problem.&lt;/p&gt;
&lt;p&gt;I have a sequence of data in Excel below mentioned and I want to autofill the the C and D columns with the similar C1 and D1 Autofill down to C18 and D18 then start selection again from C19 and D19 to C36 and D36 Autofill and  goes on like this till Last Rows 65534.&lt;/p&gt;
&lt;p&gt;Would Appreciate if anyone can help me in this.&lt;/p&gt;
&lt;p&gt;Arshad&lt;/p&gt;
&lt;p&gt;      A       B        C           D&lt;br&gt;
1    1632497 3629842409838&lt;br&gt;
2    3742803&lt;br&gt;
3    4972902&lt;br&gt;
4    6353011&lt;br&gt;
5    7303046&lt;br&gt;
6    8563079&lt;br&gt;
7    9633087&lt;br&gt;
8   11233091&lt;br&gt;
9   13733398&lt;br&gt;
10  16383729&lt;br&gt;
11  18583990&lt;br&gt;
12  20834248&lt;br&gt;
13  24434524&lt;br&gt;
14  28034800&lt;br&gt;
15  31635077&lt;br&gt;
16  35235337&lt;br&gt;
17  37535320&lt;br&gt;
18  40005299&lt;br&gt;
19   1382449362829   2409363&lt;br&gt;
20   1882532&lt;br&gt;
21   3812808&lt;br&gt;
22   5002904&lt;br&gt;
23   6453013&lt;br&gt;
24   8633077&lt;br&gt;
25   9883082&lt;br&gt;
26  11233088&lt;br&gt;
27  13733396&lt;br&gt;
28  16363727&lt;br&gt;
29  18363962&lt;br&gt;
30  20384196&lt;br&gt;
31  23984481&lt;br&gt;
32  27584755&lt;br&gt;
33  31185030&lt;br&gt;
34  35045319&lt;br&gt;
35  37445309&lt;br&gt;
36  40005288&lt;br&gt;
37   1382442362675   2408887&lt;br&gt;
38   1882525&lt;br&gt;
39   3812803&lt;br&gt;
40   5002902&lt;br&gt;
41   6733018&lt;br&gt;
42   8493070&lt;br&gt;
43   9883077&lt;br&gt;
44  11233083&lt;br&gt;
45  13733393&lt;br&gt;
46  16363728&lt;br&gt;
47  18363961&lt;br&gt;
48  20384192&lt;br&gt;
49  23984473&lt;br&gt;
50  27584745&lt;br&gt;
51  31185018&lt;br&gt;
52  35045306&lt;br&gt;
53  37445298&lt;br&gt;
54  40005278&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hello Members,</p>
<p>I have a question for how to create a macro in Excel for below problem.</p>
<p>I have a sequence of data in Excel below mentioned and I want to autofill the the C and D columns with the similar C1 and D1 Autofill down to C18 and D18 then start selection again from C19 and D19 to C36 and D36 Autofill and  goes on like this till Last Rows 65534.</p>
<p>Would Appreciate if anyone can help me in this.</p>
<p>Arshad</p>
<p>      A       B        C           D<br />
1    1632497 3629842409838<br />
2    3742803<br />
3    4972902<br />
4    6353011<br />
5    7303046<br />
6    8563079<br />
7    9633087<br />
8   11233091<br />
9   13733398<br />
10  16383729<br />
11  18583990<br />
12  20834248<br />
13  24434524<br />
14  28034800<br />
15  31635077<br />
16  35235337<br />
17  37535320<br />
18  40005299<br />
19   1382449362829   2409363<br />
20   1882532<br />
21   3812808<br />
22   5002904<br />
23   6453013<br />
24   8633077<br />
25   9883082<br />
26  11233088<br />
27  13733396<br />
28  16363727<br />
29  18363962<br />
30  20384196<br />
31  23984481<br />
32  27584755<br />
33  31185030<br />
34  35045319<br />
35  37445309<br />
36  40005288<br />
37   1382442362675   2408887<br />
38   1882525<br />
39   3812803<br />
40   5002902<br />
41   6733018<br />
42   8493070<br />
43   9883077<br />
44  11233083<br />
45  13733393<br />
46  16363728<br />
47  18363961<br />
48  20384192<br />
49  23984473<br />
50  27584745<br />
51  31185018<br />
52  35045306<br />
53  37445298<br />
54  40005278</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Akash Rao</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/18/autofill-macro/#comment-24598</link>
		<dc:creator>Akash Rao</dc:creator>
		<pubDate>Wed, 06 Jun 2007 14:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1261#comment-24598</guid>
		<description>&lt;p&gt;Dim jmp As Integer&lt;br&gt;
    For i = 1 To 172&lt;br&gt;
     jmp = 1&lt;br&gt;
        If Not IsNumeric(Range(&quot;A1?)) Then&lt;br&gt;
            &#039;MsgBox (&quot;Value of Cell is Alpabetic&quot; + Range(&quot;A1?))&lt;br&gt;
            Range(&quot;&amp;value(jmp) &amp;:&amp; value(jmp)&amp;&quot;).Select&lt;br&gt;
            Range(&quot;1:1?).Select&lt;br&gt;
            Selection.Delete Shift:=xlUp&lt;br&gt;
            &#039;Rows(&quot;9:9?).Select&lt;br&gt;
            &#039;Selection.Delete Shift:=xlUp&lt;br&gt;
        Else&lt;br&gt;
            jmp = jmp + 1&lt;br&gt;
        End If&lt;br&gt;
    Next&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;Can i use some varibles in place of the varible JMP.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dim jmp As Integer<br />
    For i = 1 To 172<br />
     jmp = 1<br />
        If Not IsNumeric(Range(&#8220;A1?)) Then<br />
            &#8216;MsgBox (&#8220;Value of Cell is Alpabetic&#8221; + Range(&#8220;A1?))<br />
            Range(&#8220;&amp;value(jmp) &amp;:&amp; value(jmp)&amp;&#8221;).Select<br />
            Range(&#8220;1:1?).Select<br />
            Selection.Delete Shift:=xlUp<br />
            &#8216;Rows(&#8220;9:9?).Select<br />
            &#8216;Selection.Delete Shift:=xlUp<br />
        Else<br />
            jmp = jmp + 1<br />
        End If<br />
    Next<br />
End Sub</p>
<p>Can i use some varibles in place of the varible JMP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/18/autofill-macro/#comment-17558</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Fri, 25 Nov 2005 13:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1261#comment-17558</guid>
		<description>&lt;p&gt;hi&lt;br&gt;
i have data that changes regulary. it wrote a macro to import into excel. after it has been imported, not all cells in each column has data in it. what i need is to autofill the cell in a column until just before a change in field and then it must autofill the new field. until the next and so on.&lt;/p&gt;
&lt;p&gt;please assist.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>hi<br />
i have data that changes regulary. it wrote a macro to import into excel. after it has been imported, not all cells in each column has data in it. what i need is to autofill the cell in a column until just before a change in field and then it must autofill the new field. until the next and so on.</p>
<p>please assist.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Rech</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/18/autofill-macro/#comment-16912</link>
		<dc:creator>Jim Rech</dc:creator>
		<pubDate>Wed, 19 Oct 2005 16:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1261#comment-16912</guid>
		<description>&lt;p&gt;I too added a fill handle macro to my personal (that makes 954) but I wanted it to work for blocks and even multiple areas.  Of course I&#039;ve never actually needed to do more than one column or row at a time but maybe someday.&lt;/p&gt;
&lt;p&gt;Jim&lt;/p&gt;
&lt;p&gt;&quot;An attempt to do what dragging the Fill Handle does&lt;br&gt;
&quot;To be attached to a keyboard shortcut (Ctrl-Shift-h) so&lt;br&gt;
&quot;I do not have to drag the file handle which is awkward&lt;br&gt;
&quot;for large ranges.&lt;br&gt;
&quot;Works with multiple area selections, mixed columns&lt;br&gt;
&quot; and rows, treating each column and row separately&lt;br&gt;
Sub FillHandleSubst()&lt;br&gt;
    Dim CurrArea As Range, StepVal As Double&lt;br&gt;
    Dim CurrSlice As Range&lt;br&gt;
    For Each CurrArea In Selection.Areas&lt;br&gt;
        If RangeIsFilled(CurrArea.Columns(1)) Then&lt;br&gt;
            &quot;If entire first col is filled we&#039;re filled across rows&lt;br&gt;
            For Each CurrSlice In CurrArea.Rows &quot;Do each row separately&lt;br&gt;
                StepVal = GetStepVal(CurrSlice)&lt;br&gt;
                CurrSlice.DataSeries Rowcol:=xlRows, Step:=StepVal&lt;br&gt;
            Next&lt;br&gt;
        Else&lt;br&gt;
            &quot;Since first col is not filled, fill down columns individually&lt;br&gt;
            For Each CurrSlice In CurrArea.Columns&lt;br&gt;
                StepVal = GetStepVal(CurrSlice)&lt;br&gt;
                CurrSlice.DataSeries Rowcol:=xlColumns, Step:=StepVal&lt;br&gt;
            Next&lt;br&gt;
        End If&lt;br&gt;
    Next&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;&quot;Returns True if entire passed range is filled&lt;br&gt;
Function RangeIsFilled(Rg As Range) As Boolean&lt;br&gt;
    On Error Resume Next&lt;br&gt;
    RangeIsFilled = (Application.CountA(Rg) = Rg.Cells.Count)&lt;br&gt;
End Function&lt;/p&gt;
&lt;p&gt;&quot;The difference between the first and second cells in the&lt;br&gt;
&quot;  passed row or column is the step amount.&lt;br&gt;
&quot;But if the second cell is empty make the step 1.&lt;br&gt;
Function GetStepVal(Rg As Range) As Double&lt;br&gt;
    Dim Cell2Val As Variant&lt;br&gt;
    Cell2Val = Rg.Cells(2).Value&lt;br&gt;
    If Cell2Val = &quot;&quot; Then&lt;br&gt;
        GetStepVal = 1&lt;br&gt;
    Else&lt;br&gt;
        GetStepVal = Cell2Val - Rg.Cells(1)&lt;br&gt;
    End If&lt;br&gt;
End Function&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I too added a fill handle macro to my personal (that makes 954) but I wanted it to work for blocks and even multiple areas.  Of course I&#8217;ve never actually needed to do more than one column or row at a time but maybe someday.</p>
<p>Jim</p>
<p>&#8220;An attempt to do what dragging the Fill Handle does<br />
&#8220;To be attached to a keyboard shortcut (Ctrl-Shift-h) so<br />
&#8220;I do not have to drag the file handle which is awkward<br />
&#8220;for large ranges.<br />
&#8220;Works with multiple area selections, mixed columns<br />
&#8221; and rows, treating each column and row separately<br />
Sub FillHandleSubst()<br />
    Dim CurrArea As Range, StepVal As Double<br />
    Dim CurrSlice As Range<br />
    For Each CurrArea In Selection.Areas<br />
        If RangeIsFilled(CurrArea.Columns(1)) Then<br />
            &#8220;If entire first col is filled we&#8217;re filled across rows<br />
            For Each CurrSlice In CurrArea.Rows &#8220;Do each row separately<br />
                StepVal = GetStepVal(CurrSlice)<br />
                CurrSlice.DataSeries Rowcol:=xlRows, Step:=StepVal<br />
            Next<br />
        Else<br />
            &#8220;Since first col is not filled, fill down columns individually<br />
            For Each CurrSlice In CurrArea.Columns<br />
                StepVal = GetStepVal(CurrSlice)<br />
                CurrSlice.DataSeries Rowcol:=xlColumns, Step:=StepVal<br />
            Next<br />
        End If<br />
    Next<br />
End Sub</p>
<p>&#8220;Returns True if entire passed range is filled<br />
Function RangeIsFilled(Rg As Range) As Boolean<br />
    On Error Resume Next<br />
    RangeIsFilled = (Application.CountA(Rg) = Rg.Cells.Count)<br />
End Function</p>
<p>&#8220;The difference between the first and second cells in the<br />
&#8221;  passed row or column is the step amount.<br />
&#8220;But if the second cell is empty make the step 1.<br />
Function GetStepVal(Rg As Range) As Double<br />
    Dim Cell2Val As Variant<br />
    Cell2Val = Rg.Cells(2).Value<br />
    If Cell2Val = &#8220;&#8221; Then<br />
        GetStepVal = 1<br />
    Else<br />
        GetStepVal = Cell2Val &#8211; Rg.Cells(1)<br />
    End If<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Wasserman</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/18/autofill-macro/#comment-16904</link>
		<dc:creator>David Wasserman</dc:creator>
		<pubDate>Wed, 19 Oct 2005 00:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1261#comment-16904</guid>
		<description>&lt;p&gt;Dick,&lt;/p&gt;
&lt;p&gt;This macro will take the first two items and autofill down or across depending on the selection. Note that the selection must be in one row OR one column.&lt;/p&gt;
&lt;p&gt;Sub FillAuto()&lt;br&gt;
    If Selection.Columns.Count = 1 And Selection.Cells.Count &gt; 1 Then&lt;br&gt;
        Selection.Range(Cells(1, 1), Cells(2,1)).AutoFill Selection&lt;br&gt;
    ElseIf Selection.Rows.Count = 1 And Selection.Cells.Count &gt; 1 Then&lt;br&gt;
        Selection.Range(Cells(1, 1), Cells(1,2)).AutoFill Selection&lt;br&gt;
    End If&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;HTH...&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick,</p>
<p>This macro will take the first two items and autofill down or across depending on the selection. Note that the selection must be in one row OR one column.</p>
<p>Sub FillAuto()<br />
    If Selection.Columns.Count = 1 And Selection.Cells.Count &gt; 1 Then<br />
        Selection.Range(Cells(1, 1), Cells(2,1)).AutoFill Selection<br />
    ElseIf Selection.Rows.Count = 1 And Selection.Cells.Count &gt; 1 Then<br />
        Selection.Range(Cells(1, 1), Cells(1,2)).AutoFill Selection<br />
    End If<br />
End Sub</p>
<p>HTH&#8230;</p>
<p>David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/18/autofill-macro/#comment-16902</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Tue, 18 Oct 2005 22:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1261#comment-16902</guid>
		<description>&lt;p&gt;&quot;then double-click the fill handle,&quot;&lt;/p&gt;
&lt;p&gt;Rob, you obviously haven&#039;t heard of my mouse-a-phobia :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&#8220;then double-click the fill handle,&#8221;</p>
<p>Rob, you obviously haven&#8217;t heard of my mouse-a-phobia <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob van Gelder</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/10/18/autofill-macro/#comment-16901</link>
		<dc:creator>Rob van Gelder</dc:creator>
		<pubDate>Tue, 18 Oct 2005 20:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1261#comment-16901</guid>
		<description>&lt;p&gt;Dick,&lt;/p&gt;
&lt;p&gt;Very useful.&lt;/p&gt;
&lt;p&gt;You probably already know this, but...&lt;br&gt;
If you have A1:A10 containing 123.&lt;br&gt;
then type A1 = 1, A2 = 2.&lt;br&gt;
select A1:A2 then double-click the fill handle, it fills down in the column region.&lt;/p&gt;
&lt;p&gt;Rob&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick,</p>
<p>Very useful.</p>
<p>You probably already know this, but&#8230;<br />
If you have A1:A10 containing 123.<br />
then type A1 = 1, A2 = 2.<br />
select A1:A2 then double-click the fill handle, it fills down in the column region.</p>
<p>Rob</p>
]]></content:encoded>
	</item>
</channel>
</rss>

