Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting with A2!
This code insert values in column a,b and d. I would like to start with
cell A2 instead of A1. Please help. With wbDest.Sheets("Ark1") For i = LBound(a) To UBound(a) .Cells(i, "a") = a(i, 1): .Cells(i, "b") = a(i, 2): .Cells(i, "d") = a(i, 3) Next End With |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting with A2!
Alen32 wrote:
This code insert values in column a,b and d. I would like to start with cell A2 instead of A1. Please help. With wbDest.Sheets("Ark1") For i = LBound(a) To UBound(a) .Cells(i, "a") = a(i, 1): .Cells(i, "b") = a(i, 2): .Cells(i, "d") = a(i, 3) Next End With I think this should work: dim i As Long, j As Long, k As Long, l As Long const ROW_START as long = 2 With wbdest.Sheets("Ark1") j = LBound(a, 1) k = UBound(a, 1) l = ROW_START - j For i = j To k .Cells(i + l, "a") = a(i, 1) .Cells(i + l, "b") = a(i, 2) .Cells(i + l, "d") = a(i, 3) Next End With HTH Rob |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting with A2!
With your code inserting start with cell A10
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting with A2!
It works very well
When I copy from here some number one change to l I don't know why. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Starting with a zero? | Excel Discussion (Misc queries) | |||
Starting add-in using vba | Excel Programming | |||
Starting add-in using vba | Excel Programming | |||
Starting over | Excel Programming | |||
Starting a userform upon starting the file | Excel Programming |