I have a series of rows that I need to auto fill in a certain way - It
would basically be the same thing as filling a series like
1,2,3,4,5,6,7,8,9,10 but it would have to be every 14 rows: (example
below)
Is there any way to do this without manually entering them? I have
thousands I have to fill in, and it will take me forever to do it
manually
Thanks!
example:
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3
3
3
3
3
3--
method373
------------------------------------------------------------------------
method373's Profile: www.excelforum.com/member.php...oamp;userid=29888
View this thread: www.excelforum.com/showthread...hreadid=495906
Hey Method,
Give this a shot
-Sub test()
Dim cell As Range, i!, z%, j%
Set cell = Range(quot;A1quot;)
z = 1
For i = 0 To 1000 Step 14
For j = 1 To 14
cell.Offset(i j, 0).Value = z
Next j
z = z 1
Next
End Sub-
This will put the first 1 in A2 just in case you have a header row.
Set the upper limit of the first for loop to w/e you need to be. For
instance if you need to go to 3000, make the upperlimit 14*3000=42000.
Hope this helps,
Jasonmethod373 Wrote:
gt; I have a series of rows that I need to auto fill in a certain way - It
gt; would basically be the same thing as filling a series like
gt; 1,2,3,4,5,6,7,8,9,10 but it would have to be every 14 rows: (example
gt; below)
gt;
gt; Is there any way to do this without manually entering them? I have
gt; thousands I have to fill in, and it will take me forever to do it
gt; manually
gt;
gt; Thanks!
gt;
gt; example:
gt;
gt; 1
gt; 1
gt; 1
gt; 1
gt; 1
gt; 1
gt; 1
gt; 1
gt; 1
gt; 1
gt; 1
gt; 1
gt; 1
gt; 1
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 2
gt; 3
gt; 3
gt; 3
gt; 3
gt; 3
gt; 3
gt; 3
gt; 3
gt; 3
gt; 3
gt; 3
gt; 3
gt; 3
gt; 3--
jtp
------------------------------------------------------------------------
jtp's Profile: www.excelforum.com/member.php...oamp;userid=21132
View this thread: www.excelforum.com/showthread...hreadid=495906
Awesome! That worked perfectly! Thanks so much!--
method373
------------------------------------------------------------------------
method373's Profile: www.excelforum.com/member.php...oamp;userid=29888
View this thread: www.excelforum.com/showthread...hreadid=495906
- Jul 20 Thu 2006 20:08
Custom auto fill question
close
全站熱搜
留言列表
發表留言