Just started working with Excel/VBA so getting my head around syntax... Here is the code
x = ActiveCell.Row ---- for arguments sake this is 1
Dim i As Long
i = 1
Do While x <= Worksheets("Config").Range("B4") - B4 is 10
Worksheets("worksheet1").Range("A").End(i).Value = 1
i = i + 1
Loop
I want it to loop 10 times and basically output the following.
1
1
1
1
1
1
1
1
1
1
I need each time the loop is entered for it to select the next row (this is where I am having probs.
Worksheets("worksheet1").Range("A").End(i).Value = 1
Variable "i" is my current row and I need to stick it on the end of A so I get A1, next loop A2 ... and so on.
Tried googling it but its kind of awkward knowing how to phrase it.
Any help appreciated.
Cheers
X
x = ActiveCell.Row ---- for arguments sake this is 1
Dim i As Long
i = 1
Do While x <= Worksheets("Config").Range("B4") - B4 is 10
Worksheets("worksheet1").Range("A").End(i).Value = 1
i = i + 1
Loop
I want it to loop 10 times and basically output the following.
1
1
1
1
1
1
1
1
1
1
I need each time the loop is entered for it to select the next row (this is where I am having probs.
Worksheets("worksheet1").Range("A").End(i).Value = 1
Variable "i" is my current row and I need to stick it on the end of A so I get A1, next loop A2 ... and so on.
Tried googling it but its kind of awkward knowing how to phrase it.
Any help appreciated.
Cheers
X