+ Reply to Thread
Results 1 to 7 of 7

Consolidating files (copy from 1 excel file to another excel file)

  1. #1
    Registered User
    Join Date
    11-17-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Consolidating files (copy from 1 excel file to another excel file)

    Hi All,


    Is there a way to copy cell values from one excel file to another excel file.
    From TrackerTest.xlsm TrackerTest.xlsm to DB.xls db.xlsx after a click of a button. Then it will automatically save the DB.xls.


    Also in the event of copying, it will skip another row if it already has a data.

    DB.xls db.xlsx
    TrackerTest.xlsm TrackerTest.xlsm
    Last edited by city; 06-19-2012 at 03:39 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Consolidating files (copy from 1 excel file to another excel file)

    Hi City,

    This code works if put in the TrackerTest Mainpage sheet and then assign the macro to your standard button.

    (You may want to acquire the habit of ActiveX controls).

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    11-17-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Consolidating files (copy from 1 excel file to another excel file)

    i tried the code. it only copies the first line from trackertest.xlsm

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Consolidating files (copy from 1 excel file to another excel file)

    Hi city,

    The macro only transfers data from the selected field row - did you want it to just transfer the whole sheet?

  5. #5
    Registered User
    Join Date
    11-17-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Consolidating files (copy from 1 excel file to another excel file)

    Thanks so much for helping me xladept!
    I need to copy all cells with values from B:G. .

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Consolidating files (copy from 1 excel file to another excel file)

    Hi city,

    The way it works is you select a field from a record on the main page - then click on your button and it transfers the b:g fields to the other sheet - is that what you wanted and is that not what it's doing?

  7. #7
    Registered User
    Join Date
    11-17-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Consolidating files (copy from 1 excel file to another excel file)

    I see. Im really having a hard time understanding the code. It does work if you select It. Thanks!!

+ 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