+ Reply to Thread
Results 1 to 4 of 4

copy a range from 2 closed workbooks to opened workbook

  1. #1
    Registered User
    Join Date
    07-26-2012
    Location
    muzaffarabad ak
    MS-Off Ver
    Excel 2003
    Posts
    30

    copy a range from 2 closed workbooks to opened workbook

    i want to copy c:\a.xls sheet1 count rows then copy column a3:a (uptil filled column)
    paste in opened workbook sheet1 at a3
    now copy c:\b.xls sheet1 count rows then copy column a3:a (uptil filled column)
    paste in opened workbook sheet1 at b3

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,042

    Re: copy a range from 2 closed workbooks to opened workbook

    to the best of my knowledge, without using VBA, uou cant copy anything from a closed workbook. however, you CAN reference data from a closed workbook using a formula like this....

    ='[your-file-name.xlsx]sheet1'!cell-referance

    you can then copy that down to where you need it to be, and if you want, copy/paste values
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    07-26-2012
    Location
    muzaffarabad ak
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: copy a range from 2 closed workbooks to opened workbook

    you may be right. then can i write such a macro which ask for file paths for the two xls files and then copy data from these files to this file and closes automatically but the file in which data is copied remain opened?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,042

    Re: copy a range from 2 closed workbooks to opened workbook

    yes, the VBA can be written to extrad the data you want, and keep the "master" open

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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