View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
dspencer[_6_] dspencer[_6_] is offline
external usenet poster
 
Posts: 1
Default How does .offset(i, counter) work?


With Range("G2")
For i = 1 To 30
.Offset(i, ModelCounter) = Range("Picked").Cells(i)
Next
End With


The above script enters data into cell G2 + i rows + ModelCounte
columns

And gets data from the range "Picked", cell number i.

So basically, it goes down the 30 rows according to i, taking the i't
cell from "Picked" and puts it in G2 + ModelCounter columns and
rows.

So if ModelCounter is 4, it will start in K3, K4, K5 .....

--
dspence
-----------------------------------------------------------------------
dspencer's Profile: http://www.excelforum.com/member.php...fo&userid=3096
View this thread: http://www.excelforum.com/showthread.php?threadid=50636