+ Reply to Thread
Results 1 to 17 of 17

automatic data updation from user workbooks to master workbook?

  1. #1
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Lightbulb automatic data updation from user workbooks to master workbook?

    Hi,

    I have one excel file i am maintaining data on date wise.
    we have another masterfile in master file one tab is representing my excel file data.
    daily i am copying data from my excel, and pasting into master file.

    is there any way/macro to automate it.

    if i click a button which is on my excel file that data should be update in masterfile.
    two files are on network drive only.
    but, the condition is without opening the masterfile that data should be saved in masterfile.

    can anyone help on this..........

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: automatic data updation from user workbooks to master workbook?

    Without opening the masterfile, the data cant be updated. However, the macro can open the masterfile for you, copy the contents, save and close it again.

    You will need to upload samples of your files so we can understand what needs to be copied.

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: automatic data updation from user workbooks to master workbook?

    i have attached two excel sheets.
    one use user tracker.
    second is master file

    i need a button on user tracker.
    when he clicks on that the data which is in user tracker should be updated to master file
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: automatic data updation from user workbooks to master workbook?

    Thank you very much for replying this thread.....

  5. #5
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: automatic data updation from user workbooks to master workbook?

    no one is replying on this........?
    please help me excel heroes(ninjas)............

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: automatic data updation from user workbooks to master workbook?

    So if the master file already has data, should the new data be copied to the next available row?

    Or should the existing data in the master file be deleted and then fresh data updated?

  7. #7
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: automatic data updation from user workbooks to master workbook?

    i need in two ways

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: automatic data updation from user workbooks to master workbook?

    What do you mean by 2 ways?

  9. #9
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: automatic data updation from user workbooks to master workbook?

    2 ways are

    >if the master file already has data, should the new data be copied to the next available row

    >existing data in the master file be deleted and then fresh data updated

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: automatic data updation from user workbooks to master workbook?

    You will require 2 macros for that - one which deletes the other and the other which keeps it.

  11. #11
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: automatic data updation from user workbooks to master workbook?

    yes i need 2 macros please mention...

  12. #12
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: automatic data updation from user workbooks to master workbook?

    Try this code which clears the master file from column B onwards. Change the bold part to match your system.
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button
    Last edited by arlu1201; 10-31-2012 at 01:59 PM.

  13. #13
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: automatic data updation from user workbooks to master workbook?

    For your 2nd macro where you do NOT want to clear the Masterfile, remove this part of the code-
    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: automatic data updation from user workbooks to master workbook?

    i am getting the following error. It is asking for open files.

    error.JPG

  15. #15
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: automatic data updation from user workbooks to master workbook?

    Oops i didnt mention it to you - since you will have multiple user files which are present in one folder, you cannot keep the macro in the user files. Instead you need to keep the macro in an independent file. It will ask you to open the master file and then it will open up the user files one by one from the path mentioned.

  16. #16
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: automatic data updation from user workbooks to master workbook?

    Thanks a lot for this macro. but,

    what i am expecting is not this.
    Just i want write opened workbook data in a closed workbook.

  17. #17
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: automatic data updation from user workbooks to master workbook?

    But you cannot do anything with a closed workbook. You will need to open it, do the actions required and then close it.

+ 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