My question is about issues with linked formulae in Excel spreadsheets.
I have a complicated structure of linked Excel Spreadsheets updated each month for Financial reporting.
The problem I have is that I will often update the values in source files. The links feed through correctly. Then I save all the files with the updated values in source and target files.
The problem arises when I reopen the files at a later time Excel forgets the revised figures. Then I need to go back and open the source files to make it pick up the new values again.
This problem is getting worse and worse, happening more and more for no apparent reason.I seem to spend half my time re-opening source files to update the linked values.
It seems like the Internal Table that Excel keeps for links is remembering old values and not saving the new one ones when I update the table.
So my question is this - how do I stop Excel doing this, how do I force it to remember the new linked values when they change in the source sheet and stop it from reverting to previous remembered values ?
To be clear, every time I do this I save everything in sight, but it makes no difference.
I have also tried to relinking to a different copy of a file and then linking back. This works sometimes, but not always.
If you're not getting this warning every time you open the 'target' workbook:
...then there's a good chance the problem is that, at some point, automatic update of external links was disabled.
To re-enable it:
On the Data tab, in the Connections group, click Edit Links
Click the Startup Prompt button
Choose the 1st or 3rd option.
Close & save all open workbooks and try it again.
If you chose the third option in step 3, all links should update automatically.
If you chose the first option in step 3, you will be asked if you want to update the links.
More Information:
Office.com : Control when external references (links) are updated
Related
I'm working on a long project and there are many betas with overlapping functionality. I keep raising the number of the beta after making substantial changes.
This file imports a bunch of data from spreadsheets which are exported feeds from a SQL database. It does this with no problem and that part of it has been working for months - importing some raw data sheets and using both cell references and VB to look at it different ways, and I set up a checklist page where the end user can go through certain records one by one and classify them.
All of this works fine and I really only made a few changes today, just finishing off little bits of code that take some data from one sheet and rearrange it in another to export. It was all working with no errors and I copied the file into a new folder (which I have been doing with these templates for months), imported my data (test data in this case), and tried to run the function that copies some info from one sheet onto an another.
Then I get an error from Excel that says "we can't connect to 'https://...my.sharepoint../BETAV9_8_ItemAccountingTEMPLATEetcetc. Please make sure you're using correct web address."
After that I click OK and then I get a second message that says:
Microsoft Excel cannot access the file 'same file' There are several possible reasons:
The file name or path does not exist
The file is being used by another program
The workbook you are trying to save has the same name as a currently open workbook
This file they're telling me they can't find is like 3 betas ago and I've been using subsequent versions without getting this error. That file isn't in the current working folder, nor in the folder from which I copied it originally.
So I'm thinking I have something in my file where there's a reference to an external file, so I went through this process: https://support.microsoft.com/en-us/office/find-links-external-references-in-a-workbook-fcbf4576-3aab-4029-ba25-54313a532ff1?ui=en-us&rs=en-us&ad=us
I don't know where to begin. There is only one thing in the Name Manager (a table that I created on one of these pages with VBA so I can sort it a couple different ways) and the button that says "Delete" is grayed out. There are several references in cells to other files - but not the BETAv9_8 it's telling me it can't find. They are simply file paths/names of the files the user imported - not hidden somewhere in code, just listed on a sheet so the user can check what data she imported.
After going through all these recommended steps I still can't find anywhere in my program that mentions BETAv9_8. In the meantime I'm getting an error for a thing that worked just fine a couple hours ago.
Is this a bug? Is there something I can do to fix it?
Thanks in advance
The problem
I have eight Excel documents that are stored on a Sharepoint site. One of those documents (“receiving file”) contains formulas/cell references to the other seven documents (“source files”) on Sharepoint.
Everything works when the references are created.
Once the workbooks are saved and closed and then reopened, the receiving file no longer updates the values from the source files.
The files are synced in Windows Explorer and opened in the desktop version of Excel. Also, all eight files are opened at the same time.
The reference will first look something like this
='[Source file.xlsx]Sheet1'!$A$1
After closing and reopening, the references will look like this
='https://somecompanyname.sharepoint.com/sites/SitefortestingExcelreferences/Shared Documents/[Source file.xlsx]Sheet1'!$A$1
If I now change a value in the source value, the change will not appear in the receiving file.
What I tried so far
Setting “Calculation” to “Automatic.
Click “Calculate Now” and “Calculate Sheet”.
Double-click into the cell with the reference and hit enter.
In “Data > Queries & Connections” click “Refresh all”
In “Data > Queries & Connections > Edit Link” I clicked on update values. It did not help. However, I tried to rebuild a simple system with just two files and a single reference, and here it did work
Starting from point 5) I programmed a little macro that updates all links in all open workbooks (it did not help either):
Option Explicit
Sub UpdateAllConnections()
Dim wbWorkbook As Workbook
For Each wbWorkbook In Application.Workbooks
wbWorkbook.UpdateLink Name:=wbWorkbook.LinkSources, Type:=xlExcelLinks
Next wbWorkbook
MsgBox "Update complete.", vbInformation, "Complete"
End Sub
If I remove the path to SharePoint, so the formula looks like this
='[Source file.xlsx]Sheet1'!$A$1
It works again (until I save and reopen).
I found the following on Microsoft Answers (about OneDrive but it's probably the same issue):
https://answers.microsoft.com/en-us/msoffice/forum/all/excel-value-links-not-updating-on-onedrive/e48a7680-71e6-4a77-9eb1-e03ec7f0e3e0
I contacted the official O365 support desk and they told me this is built into the connection between Excel and OneDrive.
They have received thousands of complaints and there is no fix for it.
No option to tell Excel/Office/OneDrive to link to local copies of files on 1D by default.
No fix is planned as this is not how MS envisions how Excel/1D should be used.
My question
Any suggestions? Are there any tools in Excel that can be used to update the linked cells automatically or manually? Might SharePoint settings prevent the update?
If not, since removing the file path to SharePoint seems to work is there a way (using VBA) to remove the full file path from all cell references, so
='https://somecompanyname.sharepoint.com/sites/SitefortestingExcelreferences/Shared Documents/[Source file.xlsx]Sheet1'!$A$1
becomes
='[Source file.xlsx]Sheet1'!$A$1
I could probably loop through all cells and simply replace the path with nothing, but that would only work if I know the file path beforehand and if all the files are stored in the same SharePoint folder.
I had the same issue and here is my workaround: I can open the source file on the Sharepoint site by clicking ... and then Open in App (as opposed to Open in Browser) The referecence cell in the receiving file will become ='[Source file.xlsx]Sheet1'!$A$1 again and get automatically updated.
My workaround would be to consolidate external links onto a single sheet, and manually or use a macro to copy / hard paste to another identical page that you use for the links.
Just run the macro when you have the workbook open on your desktop to update the values.
Even simpler, you could also have a sort of database with linked values in a column and hard copies pasted into another column. This would be simpler than two identically sized sheets.
BUT, you could also go crazy and have named ranges like quarterly_total_formula and an analogue somewhere else called quarterly_total_valueonly and then write a macro to iterate over each with a for each looking for things "LIKE" *_formula and hard paste each result into the complementary *_valueonly spot... but then you'd need a macro to check that they were all paired... and by that point you might as well not waste your time in Excel and develop in Power BI, Tableau, RMarkdown, or heck learn Adobe Illustrator or work directly in HTML.
I do not know if this has been asked elsewhere but I looked and googled around for 30 mins and couldn't seem to find much. I have an old file with some drop down boxes for certain cells in an excel spreadsheet. I never really know how it works to be honest, and there are no macros within this sheet. But somehow, there are some links between some cells within the same file.
I recently changed file names and made copies to this master file, but some of the newer copies drop down boxes no longer work, and seems to be wanting to get to the original file. I tried editing this/these link(s) under the ribbon interface using 2016 - Data > Edit Links (under connections), and it brings up a pretty dialogue box, which has this change source button. But after I clicked it and selected the correct file (it's a circular reference, so it is the current file), it simply did nothing and did not update the file name or anything else shown within the dialogue box. And of course, my links are not fixed and the drop down boxes are not working.
I have uploaded the file here with all data stripped out, but the links are still intact there for your review. Any suggestions why I am seeing this? If I want to fix the links, what can I do to achieve that without fixing each of the cells individually? Thanks!
The file is here:
https://drive.google.com/open?id=1Sn27jnQmYvqWHho6Oa0yz7PXVGU4zwPJ
These reason you're seeing these links is that there are cells with Data Validation that point to an external file (cell B71, for example).
Remove all Data Validation that is referencing external files, save the file, and re-open. The links should be gone.
Short version, my Excel is set properly to automatically update links and all my files(locally stored) work fine for years. Suddenly one will not update linked data. I click on Connections>Edit connections>Check Status every linked file has "Warning! Values referring to other workbooks were not updated"
Refresh/calculate all does nothing.Changing to manual and doing this, back to auto, open and closing, restarting, using these same files on another PC. Nothing I did fixes it.
Clicking into an individual cell(F2) then back out though updates that one cell.
Open
All security settings are correct I am 98% sure, regardless whatever settings I had haven't changed and it did work.
I read a post that seemed exactly the same but his solution was enable protected content. Not the case here, i disabled it fully. There seems to be an error causing this possibly..
Long version. This is my largest file I continue to build
I have a main excel sheet that is linked to 35 workbooks. The source workbooks have lists of 3-4 columns, ranging from 1,000-10,000 rows long. The main WB uses index match for each source to pull two small fields. It takes about 5-6mins to do a calculate all with a desktop i7 3.64ghz ivy with 16gb ram.I never have issues on. Win 10/64bit and office 2016 64bit.
Some source files are .xls, I am in the process of changing them to xlsx but when I open the xls file and the values update. I then save as xlsx with a shorter name as well (trying to lighten the formulas) I go back to Connections>Edit connections>Check Status and the same warning is there. However I can click update values and it says OK.
This is very important file and is not physically monitored. Until something sells wrong I realize it wasnt updated, I am hoping for a concrete answer I can solve instead of just changing random things and hoping.. all help is greatly appreciated!
I actually resolved this by opening all source workbooks with the main workbook open and resaving them one by one (Status on some turned OK, most remained). Then I simply used Edit Links and Update Values for each connection which changed the status to OK. Saved the main workbook and no more issues..
Yes I need to take those suggestions and the workbook to the next level as it has clearly outgrown my skillset, but getting there..
I'm almost sure I will have to create a new excel file, but maybe at least here I get some ideas what was the source of the problem.
My excel file is constantly giving the following error:
Excel found unreadable content in 'filename.xlsm'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes.
So I do. And the file opens as repaired showing:
Removed Records: Sorting from /xl/worksheets/sheet10.xml part.
The detail is that I don't even have a sheet10
Its a big excel file full of custom-objects. But I have no DB connections or autofilter so could not relate to AutoFilter Criteria Using Array (Error) - Too Large String? or xlsx error: "Removed Records: Named range from /xl/workbook.xml part" when tried to resolve errors.
Anyone has a clue what's going on?
tks in advance
try clearing the sort before saving down the workbook. When this happened to me I had my sheet references mixed up so the sort wasn't cleared
Sheets(yoursheetname).Sort.SortFields.Clear
I am afraid I cannot explain what is going on, but I had similar experience several times - always with XLSM file. In the latest case I learnt that Excel did not like the same range name used twice, when defined as Worksheet range name (we assumed it is safe to use it that way).
Our troubleshooting path is:
try to save file as XLSB (binary macro file) and either use XLSB file or save it back to XLSM
check file history (we always keep daily snapshots) and find when the problem firstly occurred; use previous version and port your changes
extract the code (via SVN code), create a new workbook and import the code back
Usually Step 1 solves the problem, but Step 3 never failed us.
Awesome,
This issue has been driving me crazy!
It seems that saving as the xlsb (binary) file PLUS adding the clearing of sort fields appears to have sorted out my issue.
I added the following code to the BeforeClose sub, it appears to clear the fields really quick, changes to my Dashboard and prompts for saving.
The xlsb file saved over a mb in file size and appears to load a little quicker!
Thanks for the pointers & support!
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Sht As Worksheet
' Clear all Sort Fields prior to Save & Exit
For Each Sht In Application.Worksheets
Sht.Sort.SortFields.Clear
Next Sht
aa1_Dashboard1.Select
aa1_Dashboard1.Activate
End Sub
I would like to add my own confirmation regarding clearing sort fields in your spreadsheet, as first suggested by Chris. I specifically had the error occur after I used column sorting in a VBA macro, so I deduced that the problem must be column/field-Sort related. It was.
Adding the line:
Sheets(yoursheetname).Sort.SortFields.Clear
after the sort command allowed the sorted columns to remain sorted (in my case), but cleared whatever was causing the
"Sorting from /xl/worksheets/sheet10.xml part." error when the file was next opened.
Many thanks for your support.
I don't know if this will help anyone but it's solved my problem. I had an excel sheet, nothing complex, just contacts, a much used file in Excel 2010 on Win7. Today I was using the 'filter' to select specific groups to email targeted content to. In the middle of selecting and copying to paste into Outlook, the document came up with a pop up as if I was installing something, then the 'installer' both of which I cancelled out of. The Document closed and then on trying to reopen, I was getting the error message. If I chose 'yes' to repair I was given just the subset of my filtered list, so about 40 of my 350 records, the rest lost. I googled and tried different things, including opening in Googledocs google sheets and nothing worked. I never 'saved' the repaired version as my old data wasn't in that. Just now, I right clicked on my document in explorer and chose "restore previous versions" and it brought me to the version of yesterday - thankfully, nothing added to it since then. Opened that one and bingo, it opened fine with ALL the data in it. I know the filter had corrupted it, so will be cautious next time I use it. I don't know why it doesn't like the filter but 4 hours on, i can now calm down and relax! Hope this helps someone.
was having this issue as well. I have a spreadsheet with multiple tabs (maybe 30 tabs?) and had filters on each sheet, and shared on SharedPoint. The error was not enabling editing of the file on SharePoint. I removed the filters on every sheet and uploaded back to SharePoint and the issue is gone!
I did what Chris mentioned above. Clear the sort fields in your spreadsheet.
Sheets(yoursheetname).Sort.SortFields.Clear
Also, save the file as *.xlsb.
That should get it to work.
When you get a message telling that Excel found unreadable.... just click "Open" and then close all the following messages you get.
-In the VBE open the project showing the name of Addin or the .xlsm.. the click anywhere in any module of the workbook as you are going to edit the text of the macro, then click save, select workbook type like Addin select the folder where you want to save it, give it a new name then click "Save", that is all you have to do, the new file you created will ok.