ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Filling cells (https://www.excelbanter.com/excel-programming/311936-filling-cells.html)

johns

Filling cells
 
What kind of loop do I need for filling A6 till A60 and then go to D6 and
filling till D60. My code is:
Sub Nummeren()
Dim lStart As Long
Dim lStop As Long
Dim i As Integer
Dim lTeller As Long
lStart = Range("J1").Value
lStop = Range("K1").Value
i = 6

For lTeller = lStart To lStop Step 10
Cells(i, 2).Value = lTeller
i = i + 1
Next

End Sub
With this code I want to fill the column B6 till B60, then jump to D6 till
D60. etc.
The teller stops when it is reaching the number mentioned in lstop.
J1 = 38400
K1 = 38800

Who can help?
John

N10

Filling cells
 
HI JOhn

I m just starting out on this stuff so Im may be missing a clue or two and
want to understand but I dont undstand your posted code as it seems to have
nothing to do with the stated goal of filling A6 through A 60 ?


Best n10



"JohnS" wrote in message
...
What kind of loop do I need for filling A6 till A60 and then go to D6 and
filling till D60. My code is:
Sub Nummeren()
Dim lStart As Long
Dim lStop As Long
Dim i As Integer
Dim lTeller As Long
lStart = Range("J1").Value
lStop = Range("K1").Value
i = 6

For lTeller = lStart To lStop Step 10
Cells(i, 2).Value = lTeller
i = i + 1
Next

End Sub
With this code I want to fill the column B6 till B60, then jump to D6 till
D60. etc.
The teller stops when it is reaching the number mentioned in lstop.
J1 = 38400
K1 = 38800

Who can help?
John



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



johns

Filling cells
 
If you start this with a button this code will fill one column with numbers
in cell J1 through cell K1. Now I want just to fill the numbers starting at
A6 till A60 and then go further on to D6 and fill this cell with the rest of
numbers till the last number. Every time if the code reaches row 60 it has to
jump to the next column.

John.

"N10" wrote:

HI JOhn

I m just starting out on this stuff so Im may be missing a clue or two and
want to understand but I dont undstand your posted code as it seems to have
nothing to do with the stated goal of filling A6 through A 60 ?


Best n10



"JohnS" wrote in message
...
What kind of loop do I need for filling A6 till A60 and then go to D6 and
filling till D60. My code is:
Sub Nummeren()
Dim lStart As Long
Dim lStop As Long
Dim i As Integer
Dim lTeller As Long
lStart = Range("J1").Value
lStop = Range("K1").Value
i = 6

For lTeller = lStart To lStop Step 10
Cells(i, 2).Value = lTeller
i = i + 1
Next

End Sub
With this code I want to fill the column B6 till B60, then jump to D6 till
D60. etc.
The teller stops when it is reaching the number mentioned in lstop.
J1 = 38400
K1 = 38800

Who can help?
John



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004





All times are GMT +1. The time now is 03:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com