Increasing columns


J

JTWarthogs

If the code

row= 10
For i = 1 to 5
row= row+1
Worksheets("73").Range("b" & row).Copy Destination:=Worksheets("73-1
Data").Range(("b" & row)
next i

lets me take and copy b11, b12, b13, b14, b15

So how can I take the column and move it. Lets say that in the above I want
to move the copy to destination to change from a, b, c, d, e

row = 10
column = a
For i = 1 to 5
row= row+1
column = column + 1(???not really 1 so how do I do it????)
Worksheets("73").Range("b" & row).Copy Destination:=Worksheets("73-1
Data").Range((column & row)
next i

Thanks
 
Ad

Advertisements

J

JLatham

Dim rowLoopCounter As Integer
Dim coloopCounter As Integer

For rowLoopCounter = 10 to 15
For colLoopCounter = 1 to 5 ' a=1, b=2...e=5
Worksheets("73").Cells(rowLoopCounter, colLoopCounter).Copy _
Destination:=Worksheets("73-1 Data").Cells(rowLoopCounter, colLoopCounter)
next ' move to next column
Next ' move to next row

I think maybe that'll get you going. At least I hope it does.

Although maybe you want to leave the range to be copied as "B" &
rowLoopCounter - I wasn't real sure from what you showed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top