Consulting

Results 1 to 3 of 3

Thread: VBA copy last row of a sheet of a workbook to last row of sheet in another workbook

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    VBA copy last row of a sheet of a workbook to last row of sheet in another workbook

    Dears
    As beginner of VBA I'd like your help to have a macro to copy the last row of a sheet of a workbook to the last row of a sheet in another workbook.
    I searched here and found similar solved requests but not exactly the one fitting fully to my request.

    I have enclosed an example workbook (for simplification reasons I put the two sheets in the same workbook): data to be copied in the month of September are marked in yellow: in the source file & source sheet it is cell A14 to G14, in the destination file & sheet it shall be copied to cell D14 to J14.
    In October it should be then cell A15 to G15 to be copied to cell D15 to J15.


    1. Workfile from which to copy last row shall ideally remain closed
    2. Workfile name from which to copy will not change, also not the name of the worksheet in this file (so in attached example it will be "Testmacro.xlsm" for the Source file and the sheetname "Sheetwithdatatocopy"). Same for the destination file: no change in file name as well sheet name
    3. The last row will change each month, it means that each month a new row will be added
    4. Data set starts in row 5 (before in the first rows is some text)
    5. The last row of this worksheet shall be copied into the last row of another workfile and corresponding sheet (in this example the sheetname is "DestinationSheet")


    I appreciate any support and I hope that my description is clear.
    Thank you in advance
    Best regards
    Megaheinz
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •