+ Reply to Thread
Results 1 to 14 of 14

Copy 2 different columns from one workbook to other after end of the data

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    65

    Copy 2 different columns from one workbook to other after end of the data

    Hi There,

    I need to copy column A and B from a worksheet (tab – Abslayer_BCN) and paste the values in a separate spreadsheet at the end of the E : F columns ( Tab - Abslayer_SAP_BCN). When I say End of the E:F column which I mean I want to paste these immediately after the data where blank row appears. Because I am collating the data after every batch run in this sheet.

    I am using 2003 version. When I run the macro the both the worksheets will be open.

    I am trying the below code which is not working so I need some expert’s help to resolve this.

    Please Login or Register  to view this content.
    I appreciate every single reply and how everyone tries and help others in this forum. This is really amazing.

    Thanks,
    Su.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy 2 different columns from one workbook to other after end of the data

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    09-28-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    65

    Re: Copy 2 different columns from one workbook to other after end of the data

    That works perfect.

    Thanks very much Patel.

  4. #4
    Registered User
    Join Date
    09-28-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    65

    Re: Copy 2 different columns from one workbook to other after end of the data

    Hi Patel,

    The code works for just one row.

    For eg: it just copies the first row from the batch extract to my tool.

    Attached is the sample.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy 2 different columns from one workbook to other after end of the data

    I did not understand your new question

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy 2 different columns from one workbook to other after end of the data

    Try this one

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-28-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    65

    Re: Copy 2 different columns from one workbook to other after end of the data

    Thanks AB33.

    This code works for all. Thank you very much.

  8. #8
    Registered User
    Join Date
    09-28-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    65

    Re: Copy 2 different columns from one workbook to other after end of the data

    Hi AB33,

    I am trying the below code which is pretty same logic as above.

    It copies A:B to E:F perfectly.
    After I am trying to copy B (from batch extract) to G(Test Forum Sample) and C(from batch extract) to A (Test Forum Sample) which copy nothing.

    Can you please correct me if I am doing anything wrong.

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    09-28-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    65

    Re: Copy 2 different columns from one workbook to other after end of the data

    Can anyone help with this please?

  10. #10
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy 2 different columns from one workbook to other after end of the data

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    09-28-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    65

    Re: Copy 2 different columns from one workbook to other after end of the data

    Hi Patel,

    Thanks for your kind reply.

    But this only copies A and B from Batch_2_Report.xls to E:F in Test Forum - Sample.xls.

    It does not copy B and C from Batch_2_Report.xls to G and A in Test Forum - Sample.xls....:-(

    Thanks,
    Su
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy 2 different columns from one workbook to other after end of the data

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    09-28-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    65

    Re: Copy 2 different columns from one workbook to other after end of the data

    Finally this does what I expect.

    Your genius. Thank you loads buddy.

  14. #14
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy 2 different columns from one workbook to other after end of the data

    It's easy to solve when the files are available, if you want quick answers you know what to do.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1