Copy Data from one sheet and insert to the end of a table on another sheet

  • Re: Copy Data from one sheet and insert to the end of a table on another sheet


    The following code will do what you want.



    Hope this helps
    Anthony

    Regards
    [SIZE=3]Anthony
    [/SIZE]&WCF_AMPERSAND[SIZE=3]
    [/SIZE]&WCF_AMPERSAND&WCF_AMPERSAND&WCF_AMPERSAND[SIZE=2]You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.[/SIZE]




  • Re: Copy Data from one sheet and insert to the end of a table on another sheet


    Hi

    It works perfectly, exactly what i wanted.
    Just wondering about this other question.
    What would be the code to transfer the 'timetable' sheet from one workbook to the 'data' sheet in another workbook.

  • Re: Copy Data from one sheet and insert to the end of a table on another sheet


    The process is fairly much the same. For this to work it assumes that the second workbook is open at the same time as the first workbook. Just substitute the workbook name for the second workbook into the following code.



    Hope this helps
    Anthony


    PS: If the other workbook is closed you can do the following

    Code
    Workbooks.Open Filename:="C:\Path to second workbook.xlsx", _
            UpdateLinks:=0

    Regards
    [SIZE=3]Anthony
    [/SIZE]&WCF_AMPERSAND[SIZE=3]
    [/SIZE]&WCF_AMPERSAND&WCF_AMPERSAND&WCF_AMPERSAND[SIZE=2]You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.[/SIZE]




  • Re: Copy Data from one sheet and insert to the end of a table on another sheet


    Ok i will try it out should work.


    I need to paste the cells as values.. when i use PasteSpecial (xlPasteValues) instead of Paste, it gives an error.

  • Re: Copy Data from one sheet and insert to the end of a table on another sheet


    You can paste as values but to preserve the format you will need to use the following



    Is that what you need? If you dont keep the xlPasteFormats command you will lose the format of your dates and times in the spreadsheet. If I am missing want you want let me know in more detail.
    Hope this is what you want
    Anthony

    Regards
    [SIZE=3]Anthony
    [/SIZE]&WCF_AMPERSAND[SIZE=3]
    [/SIZE]&WCF_AMPERSAND&WCF_AMPERSAND&WCF_AMPERSAND[SIZE=2]You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.[/SIZE]




Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!