Home>



The copy source and copy destination have the same number of columns.
In the example of the image, the desired result has the numerical values ​​of 1, 3 and 9 in the 2, 3 and 4 rows of the copy source B column.
Post to rows 2, 3 and 4 of column B of the copy destination, and if there is already a numerical value in the copy destination, post from the next row at the end.
I want to
I plan to repeat the same operation from column B to column AL, and when I try it in column B,
It is a state where the data is rotated in cell B2 without posting 1, 3 and 9, and only the final 9 is posted.
I would like to ask you to teach me how to resolve this situation and achieve the desired result.

We are adding images.
I want to add the original data to the end of the previous data with the click of a button.

Always I am indebted.
Now, I tried to write the posting syntax from the current work book to another book as follows. It does post, but the behavior is strange, it always reflects all the data in cell B2 and moves steadily, and then the last line is lined up in a row. I finally managed to make a transcription syntax, but I couldn't go any further by self-help, and I would really appreciate it if you could teach me. Thank you.

Sub button 89_Click ()
 Dim i As Long
 Dim x As Long
 Dim wb As Workbook
 Set wb = Workbooks.Open (ThisWorkbook.Path&"\ Roulette data.xlsx")
For i = 2 To ThisWorkbook.Worksheets ("rotation speed"). Cells (Rows.Count, maxcolumn) .End (xlUp) .Row
For x = 1 To Workbooks ("roulette data"). Worksheets ("data rotation speed"). Cells (Rows.Count, _
        Maxcolumn) .End (xlUp) .Row
   ThisWorkbook.Worksheets ("rotation speed"). Range ("B"&i) .Copy_
   Workbooks ("roulette data"). Worksheets ("data rotation speed"). Range ("B"&x) .Offset (1)
Next
Next
End Sub
  • Answer # 1

    I'm sorry to make a noise, but when I modified the code as follows, I got the desired result.
    It seems that this is all, but from the last line down, it was possible in this way. .. I was worried because I thought it would be more difficult, but ...
    However, after all it becomes heavy, isn't it?
    Dim i As Long
     Dim n As Long
     Dim wb As Workbook
     Set wb = Workbooks.Open (ThisWorkbook.Path&"\ Roulette data.xlsx")
     For maxcolumn = 2 To 39
      For i = 2 To ThisWorkbook.Worksheets ("rotation speed"). Cells (Rows.Count,
    Maxcolumn) .End (xlUp) .Row
          N = Workbooks ("roulette data"). Worksheets ("data rotation speed"). Cells (Rows.Count,
    Maxcolumn) .End (xlUp) .Row + 1
       ThisWorkbook.Worksheets ("rotation speed"). Cells (i, maxcolumn) .Copy Workbooks ("roulette"
    Data "). Worksheets ("data rotation speed "). Cells (n, max column)
    Next
    Next
    End Sub
    code