+ Reply to Thread
Results 1 to 10 of 10

Auto Collect Data from another WorkBook

  1. #1
    Forum Contributor
    Join Date
    05-12-2012
    Location
    India, Chennai
    MS-Off Ver
    Excel 2003
    Posts
    182

    Auto Collect Data from another WorkBook

    Please Help !!!

    I have two workbook. I need to auto collect the data from WorkBook1 to WorkBook2 IF the conditions are True.
    Attached the two reference WorkBooks in detail.

    Thanks for your time and effort
    Attached Files Attached Files
    Last edited by skhari; 05-20-2012 at 03:44 AM.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Auto Collect Data from another WorkBook

    Try this code in a copy of WorkBook2...
    Please Login or Register  to view this content.
    Last edited by dangelor; 05-20-2012 at 11:59 AM.

  3. #3
    Forum Contributor
    Join Date
    05-12-2012
    Location
    India, Chennai
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: Auto Collect Data from another WorkBook

    Thank you so much Dangelor, that was perfect solution.
    Is it possible to make Sorting by dates (if the dates are before and after entry).

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Auto Collect Data from another WorkBook

    Added sort to final list.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-12-2012
    Location
    India, Chennai
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: Auto Collect Data from another WorkBook

    Hi Dangelor, Your Sorting code made easy. Thanks a lot.
    Sorry last query to finish it up. It seems that i have to open always both the workbook for to refer .?! or is there any way that WorkBook1.xlsx can be closed. Because workbook entries are handled by two person which is kept same server (same folder) user is different for each workbook.
    Thanks for time

  6. #6
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Auto Collect Data from another WorkBook

    Sorry, I don't have much experience using files on a server. I'll put in a request for help from someone who may...

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto Collect Data from another WorkBook

    I don't think it being on a server is the issue, you have to know the full correct path that your computer sees that folder, but other than that it should be a straightforward addressing issue.

    So, the macro should check if the workbook is open, and use it normally if it is. If it is not, it will open the wb in the backlground, run, then close the workbook again. I'd suggest also noting whether WB1 is open or not already, so the macro does not close it on you.

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  8. #8
    Forum Contributor
    Join Date
    05-12-2012
    Location
    India, Chennai
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: Auto Collect Data from another WorkBook

    That was perfect. Thank you very much dangelor and JBeaucaire, (Open Close File ) Works
    Having problem in Sorting. I want to sort by date as-well. but still it is not happening (now the date is in "F" Row).

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto Collect Data from another WorkBook

    Here's the line of code that controls the sorting:
    Please Login or Register  to view this content.
    That 1 means column A, so change that to 6 for column F.

  10. #10
    Forum Contributor
    Join Date
    05-12-2012
    Location
    India, Chennai
    MS-Off Ver
    Excel 2003
    Posts
    182

    Re: Auto Collect Data from another WorkBook

    Thats it solved... Thank you so much

+ 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