JohnPoole
Active Member
- Joined
- Jun 9, 2005
- Messages
- 267
Hi all, I seem to be having a problem getting the following code to place the numbers in columd D after row 256, wherby the it goesback to cell D2 and places the remaning numbers in that cell. I cant understand why, can anyone help?
Here is the code im using.
<font face=Courier New>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Sub</SPAN> count256()
Counter = 0
<SPAN style="color:#00007F">Do</SPAN>
Selection = Cells(Columns.Count, 4).End(xlUp).Offset(1, 0).Activate
Selection.Value = Counter
Counter = Counter + 1
<SPAN style="color:#00007F">Loop</SPAN> <SPAN style="color:#00007F">Until</SPAN> Counter = 300
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>
As far as i can tell this should put the numgbers 0-300 into column D.
Many thanks.
Here is the code im using.
<font face=Courier New>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Sub</SPAN> count256()
Counter = 0
<SPAN style="color:#00007F">Do</SPAN>
Selection = Cells(Columns.Count, 4).End(xlUp).Offset(1, 0).Activate
Selection.Value = Counter
Counter = Counter + 1
<SPAN style="color:#00007F">Loop</SPAN> <SPAN style="color:#00007F">Until</SPAN> Counter = 300
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>
As far as i can tell this should put the numgbers 0-300 into column D.
Many thanks.