View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
jtp
 
Posts: n/a
Default Custom auto fill question


Hey Method,
Give this a shot

-Sub test()
Dim cell As Range, i!, z%, j%

Set cell = Range("A1")
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,

Jason


method373 Wrote:
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



--
jtp
------------------------------------------------------------------------
jtp's Profile: http://www.excelforum.com/member.php...o&userid=21132
View this thread: http://www.excelforum.com/showthread...hreadid=495906