Roger Govier
12/15/2006 5:12:00 PM
Hi
Dim i As Integer
For i = 1 To 26
ActiveCell.Offset(0, i) = Sheets("drivers").Cells(1, i)
Next
--
Regards
Roger Govier
"keri" <keri.dowson@diageo.com> wrote in message
news:1166195989.228099.112070@j72g2000cwa.googlegroups.com...
>I have used the code;
>
> Dim i as integer
> For i = 1 to 26
>
> a lot to refer to sheets and rows numbered consequtively. However I am
> writing code with the lines below;
>
> ActiveCell.Offset(1, 1) = Sheets("drivers").Range("a1")
> ActiveCell.Offset(1, 1) = Sheets("drivers").Range("b1")
> ActiveCell.Offset(1, 1) = Sheets("drivers").Range("c1")
> ActiveCell.Offset(1, 1) = Sheets("drivers").Range("d1")
>
> And i wondered if there was a way to do a similar thing in this code
> with the column letters. I guess it will be a way of referring to the
> column instead of having the above code for 35 lines referring to each
> column individually. Can anyone suggest the way to but a Next in this
> code so I can shorten my macro considerably?
>