Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Working in Excel 2003
I am trying to read the contents of cells in a row of variable length offset by the contents of cell C2 and write the contents to Sheet 2 starting at cell C2. I have written the following procedure to accomplish the task: Sub CopyProcedure() Dim I As Integer I = 2 Do With Worksheets("Sheet1").Cells(I, 2) .Range(.Cells(1), _ .End(xlToRight)).Copy Destination:=Worksheets("Sheet2").Cells(I, 2) I = I + 1 End With Loop While Worksheets("Sheet1").Cells(I, 2).Value < "" End Sub The problem: The procedure is reading and writing the next row down from the initial offset cell (C2). Thereafter, in the looping process it reads and writes the contents of the second row after the row just written. How do I get the procedure to read and write every row? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sumproduct - reading a variable value | Excel Discussion (Misc queries) | |||
Counting Variable Length of Rows in a Named Range | Excel Programming | |||
Counting Variable Length of Rows in a Named Range | Excel Programming | |||
Counting Variable Length of Rows in a Named Range | Excel Programming | |||
Reading Textfile into a variable | Excel Programming |