I want to paste the copied data to the next column after the last column on another sheet, as shown in the title.
I'm thinking I'll do it with xlToRight,
I asked a question because the code didn't work well when I changed the range ("A1"). .

Current code

Range (Range ("C8"), Cells (Rows.Count, 3) .End (xlUp)). Copy ThisWorkbook.Sheets ("Data"). Range ("A1")
Tool version

Excel 2016

  • Answer # 1

    That means that you can get the last column of the first row.

    The last row in the third column is
    Cells (Rows.Count, 3) .End (xlUp)
    You can write the code to get it in, so if you apply it, you can do it right away.

    One right in the last column of the first row
    Cells (1, columns.Count) .End (xlToLeft) .Offset (, 1)