vba - Using a for-Loop to raise the row- index in Excel -


I want to copy one column of data from one worksheet to another place until the next. I want to give Excel the value given in "I3", then copy the data from "AA3 to AA 72" in Table 1, paste it into Table 2 in "D4" and remove the value given in "I3" . Then the macro should be given the value given in table I of "I4" and paste the data into "D5" in "AA3 to AA 72" on Table 2. And there is nothing like that.

The code looks like this:

  sub firstTry () x = 1 y = 1 value = worksheet ("Table 1"). = 1 to 69 worksheet ("Table 2") for range ("C1"). Room (9 2 + x) = Value Worksheet ("Table 2"). Range ("AA3: AA 72") Copy Worksheet ("Table 1"). (4,3 + y) .x1Paste Special Transje: = True Worksheet ("Table 2"). Cells (9 2 + x) = 0x = x + 1 y = y + 1 Next S & Sub  

The main problem is that Excel does not increase the row-index, it is " I3 "and it says.

Is there anything wrong in my way to increase the index?

Thank you in advance

if you want to increase the row number Do not make it a stable.

For example,

  cells (4, 3 + y)  

should, perhaps, look like:

  cells (3 + y, 4)  

Because the row is first and in the second column, cells (,). Value


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -