+ Reply to Thread
Results 1 to 10 of 10

update master excel sheets from child sheets

  1. #1
    Registered User
    Join Date
    01-23-2020
    Location
    Scotland
    MS-Off Ver
    0365
    Posts
    18

    update master excel sheets from child sheets

    I currently have a master sheet that I am compiling all audit results in, however this is becoming clumsy to use and it exposes some findings between regions that i may not wish to do.

    I want to give out individual worksheets to each region and when they update their copy it automatically updates the master. If something is changed in the child then just the changed date should be updated in the master, if something new is added then this record is added in full.
    Each row in each sheet has a unique reference number (Unique between sheets also) so that I can identify individual rows.

    I am not sure what is the most appropriate method, I have seen some posts looking to achieve this or part of, however I cannot get my head around how I apply it to my requirements.

    Any help would be greatly appreciated.

    I have attached examples of the master and child workbooks.

    Thanks in advance.
    Attached Files Attached Files
    Last edited by Pepe Le Mokko; 03-22-2020 at 09:14 AM. Reason: Shortened title

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Need to update master excel sheets from child sheets with any new information added/ch

    Start by copying the headers in rows 1 and 2 from the individual file to the Master. This method assumes that the Master file and individual file are both open. It assumes that the unique reference number is in column H. Copy and paste this macro into the worksheet code module for the first individual file. Do the following: right click the tab name for your Non-Conformities sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Repeat this for every individual file so that they each contain the macro. Also, in all the individual files, delete all the unused unique reference numbers in column H. The unique reference number in column H should be added as needed.
    Please Login or Register  to view this content.
    As you enter data in the individual files, that data will be automatically copied to the Master.
    Last edited by Mumps1; 03-20-2020 at 09:23 AM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    01-23-2020
    Location
    Scotland
    MS-Off Ver
    0365
    Posts
    18

    Re: Need to update master excel sheets from child sheets with any new information added/ch

    Mumps1 That is working great in initial testing thank you. Can I maybe ask for a couple of additions, can you auto generate the next Ref number when a record is added and are you able to have the Master automatically open when data is entered into the "child" worksheet. This would remove the risk of people forgetting to open the master at the same time.

    if not I am grateful for what you have already given me.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Need to update master excel sheets from child sheets with any new information added/ch

    Replace the previous macro with the code below. This version forces you to enter new data in the first available blank row. It also generates the next Ref number. Because the macro is a worksheet change event, it wouldn't work to have the Master automatically open when data is entered into the "child" worksheet. However, we could open the Master automatically when the "child" workbook is opened. If that works for you, are the child files and the Master file saved in the same folder? If not, what is the full path to the folder where the Master is saved?
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-23-2020
    Location
    Scotland
    MS-Off Ver
    0365
    Posts
    18

    Re: Need to update master excel sheets from child sheets with any new information added/ch

    Hi Mumps1, yes the spreadsheets will be stored in the same folder within SharePoint. I open the spreadsheets using the desktop application as the online O365 does not do macros. I may have to put in the URL of the other files if the opened one is seen as local by excel.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Need to update master excel sheets from child sheets with any new information added/ch

    To be honest, I don't have any experience working with SharePoint. My idea was to insert a Workbook_Open event into the code module for ThisWorkbook in the child files so that when each file was opened, it would also open the Master.

  7. #7
    Registered User
    Join Date
    01-23-2020
    Location
    Scotland
    MS-Off Ver
    0365
    Posts
    18

    Re: Need to update master excel sheets from child sheets with any new information added/ch

    Hi Mumps, that is fine, if could supply me with the code for opening a workbook in the same folder i will try it and see if I can adapt it.

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: update master excel sheets from child sheets

    Place this code in the code module for ThisWorkbook. Do the following for each child file: Hold down the ALT key and press the F11 key. This will open the Visual Basic Editor. In the left hand pane, double click on "ThisWorkbook". Copy/paste the code into the empty window that opens up. Close the window to return to your sheet. Save the file, close it and then re-open it.
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    01-23-2020
    Location
    Scotland
    MS-Off Ver
    0365
    Posts
    18

    Re: update master excel sheets from child sheets

    Mumps, This is great and thank you very much for all your help. No doubt I will turn to the Forum again.

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: update master excel sheets from child sheets

    My pleasure.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA Code for mirroring data bidirectionally from master sheet to child sheets
    By chandhana21 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-11-2017, 08:54 PM
  2. Update from Master other sheets without loosing information
    By alejorubi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2014, 03:19 PM
  3. Replies: 1
    Last Post: 05-16-2014, 02:09 PM
  4. [SOLVED] master sheet updated itself with new added sheets
    By greatairi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-22-2013, 02:50 AM
  5. Update same fields in different spread sheets in one master sheets
    By vijaykumarb2002 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-14-2013, 06:34 AM
  6. Replies: 0
    Last Post: 01-14-2011, 12:01 PM
  7. Copy Rows from Master Sheet to Child Sheets Base on Values
    By Traquair in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2010, 03:19 PM

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