Update links between excel files

vjpkr

New Member
Joined
Oct 23, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have an excel file (let's say master) which refers or gets data from 120 slave excel files using formulae like "='Z:\EDP\[LLC.xlsx]Model'!$A$12".
Sometimes the cells in salve excel files may have lookup formulae to more excel files. The issue I am facing is that the Master excel file is not reflecting updated data whenever any change happens in the slave excel files. I tried below.
1. Calculation options is set to "Automatic".
2. Inserted a VBA code "ActiveWorkbook.UpdateLink , Type:=xlExcelLinks"
3. used Edit links option but this does not seem feasible since I have 100+ links.

Can you help me to overcome this problem. Any type of suggestions/vba code is welcome.
Thanks.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
When working with external links to multiple slave Excel files in a master Excel file, ensuring that the master file updates correctly can be a bit challenging. Here are some steps and considerations to help you ensure that the data in the master file reflects changes in the slave files:

1. **Check File Locations and Paths:**
- Ensure that the file paths in your formulas are correct and the slave files are accessible. Make sure there are no typos or changes in the file structure that might have broken the links.

2. **Formula Evaluation Order:**
- Excel calculates formulas in a specific order. If a formula in the master file depends on a formula in a slave file that hasn't been recalculated yet, it might not update correctly. Ensure that the dependent formulas in the master file are evaluated after the slave files are recalculated.

3. **Automatic Calculation:**
- As you mentioned, set your calculation options to "Automatic" in both the master and slave files. This ensures that Excel recalculates all formulas whenever changes are made in the slave files.

4. **Refresh All Data:**
- In the master file, you can try using the "Refresh All" feature, which forces Excel to recalculate all external references and update the data from the slave files. You can find this option in the "Data" tab.

5. **VBA Macro for Recalculation:**
- You can create a VBA macro in the master file that triggers the recalculation of all formulas. Here's an example of how you can do it:


VBA Code:
vba
   Sub RecalculateAllLinks()
       Dim Link As Variant
      
       For Each Link In ThisWorkbook.LinkSources
           ThisWorkbook.UpdateLink Link
       Next Link
   End Sub

You can run this macro whenever you need to update the links. Note that this macro iterates through all external links in the master file.

6. **Check External References:**
- Ensure that you don't have circular references or complex dependencies that prevent Excel from updating correctly.

7. **Data Connections and Power Query:**
- Depending on the complexity of your data, you might consider using Power Query or data connections to import and merge data from the slave files into the master file. This can provide more control and flexibility.

8. **Regular Maintenance:**
- Periodically review and update the links in your master file, especially if there are changes to the slave files or file locations.

9. **Link Manager:**
- Use the "Edit Links" option to check for and manage external links. This can help you identify and resolve any issues with link updates.

10. **Testing and Troubleshooting:**
- Try simplifying your setup by creating a small set of master and slave files. Test whether updates work correctly in this simplified setup. If they do, gradually apply the same principles to your larger dataset.

By following these steps and ensuring that all external links are correctly set up and that calculations are being triggered properly, you should be able to maintain accurate and up-to-date data in your master file.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top