Try something like this (I used the dashes to indicate indenting since I don't know how to get code on here via HTML like some of these wizards -- replace them with spaces):
Dim intI as Integer
Dim intJ as Integer
Dim intCol as Integer
intCol = 1 '(or whatever column you would like to put these values in)
For intI = 1 to 4
----For intJ = 1 to 64
--------Cells(intJ * intI, intCol) = intI
----Next intJ
Next intI
Johnny,
I'm not sure where you get 4096 from. 64 * 4 = 256. Anyway, here's some code you should be able to modify if it doesn't do what you want.
Sub CreateColumn()
myCol = 1
myRow = 1
For x = 1 To 4
For y = 0 To 63
Cells(y + myRow, myCol).Value = x
Next y
myRow = myRow + 64
Next x
End Sub
-Ben O.
I'm not sure where you get 4096 from. 64 * 4 = 256. Anyway, here's some code you should be able to modify if it doesn't do what you want. Sub CreateColumn() myCol = 1 myRow = 1 For x = 1 To 4 For y = 0 To 63 Cells(y + myRow, myCol).Value = x Next y myRow = myRow + 64 Next x
Sorry about that; I meant up until I have 64 64's. Thanks for the code, though! :
My (simpler) code will work for 64 "64's" too, just change the first "1 to 4" to "1 to 64":
Try something like this (I used the dashes to indicate indenting since I don't know how to get code on here via HTML like some of these wizards -- replace them with spaces):
Dim intI as Integer
Dim intJ as Integer
Dim intCol as Integer
intCol = 1 '(or whatever column you would like to put these values in)
For intI = 1 to 64
----For intJ = 1 to 64
--------Cells(intJ * intI, intCol) = intI
----Next intJ
Next intI
Have fun,
Russell
Thanks, Russell; I actually did use your code from the first reply. I wish my job required more use of VB. I'd be forced to learn it well. As it stands, I'm kind of a blind fool! Thanks for the help.