none
VBA copy data to last row and last column, starting at A1 RRS feed

  • Question

  • I would like to be able to copy data from one worksheet to another.

    the data can start in cell A1

    I do not know how many rows of data, or how many columns, this varies.

    there is no gaps (blank rows or columns) in the data.

    Thanks

    Wednesday, March 14, 2018 2:35 PM

Answers

  • Use code like

    ActiveSheet.UsedRange.Copy Worksheets("Sheet to copy to").Range("Range to copy to")

    like

    ActiveSheet.UsedRange.Copy Worksheets("Sheet1").Range("A1")

    • Marked as answer by James N San Wednesday, March 14, 2018 8:55 PM
    Wednesday, March 14, 2018 8:19 PM

All replies

  • Use code like

    ActiveSheet.UsedRange.Copy Worksheets("Sheet to copy to").Range("Range to copy to")

    like

    ActiveSheet.UsedRange.Copy Worksheets("Sheet1").Range("A1")

    • Marked as answer by James N San Wednesday, March 14, 2018 8:55 PM
    Wednesday, March 14, 2018 8:19 PM
  • Works great! Thanks!
    • Marked as answer by James N San Wednesday, March 14, 2018 8:55 PM
    • Unmarked as answer by James N San Wednesday, March 14, 2018 8:55 PM
    Wednesday, March 14, 2018 8:55 PM