Forum Discussion
Wendy Goeminne
Mar 21, 2017Copper Contributor
"Ghost links" in excel
Dear all,
I have a link in my excel (visible in data/edit links) but I cannot find in which cell this link exists. I have already tried to search for it with Ctrl F, but no result. If I try to relink, I get no error message, but the link is not replaced.
How can I find the cell that contains this link?
I'd rather not "break the link" to avoid wrong data in my file. It is quite a large calculation file, so not easy to look for it manually.
Many thanks for any input
with kind regards,
Wendy
- JohnTjiaCopper Contributor
I had ghost links from two worksheets I copied over from an older workbook to my current one. I could not find them even after:
1. Break Links or Change Source from the Edit Links command in the ribbon
2. Checking Name Manager for ranges linked to outside workbooks
3. Removing all Conditional Formatting (this was in a spare testing copy)
4. Removing all Data Validation5. Removing all my custom Format Styles
6. Did a Copy / Paste-Value for the two worksheets, essentially converting all formulas to hard-coded values
7. The links appeared only when I brought in the two worksheets. So there are no hidden worksheets in my current workbook that might hold these hidden links.
8. I cannot use outside utilities such as File Manager (same name as the Excel feature) that can look for hidden range names.
My final solution, which worked, is to run this code which I found in some forum which removes any hidden range names, and so I finally got the links to go away:
*********
Sub Remove_Hidden_Names()
Dim xName As Name
Dim k As Integer
Dim x As Integer
x = 0
On Error Resume Next
For Each xName In ThisWorkbook.Names
If xName.Visible = False Then
xName.Delete
x = x + 1
End If
Next xName
MsgBox x & " hidden names have been deleted.", vbInformation + vbOKOnly, "Hidden names deleted"
End Sub- trangvvCopper Contributor
Hi,
Log in to left a reply. I just want to give a a HUGE THANK because omg you've saved A LOT of my files. Thank you so so much!!
- Ben_TurnerCopper Contributor
Just to add one more thing to the list of possibilities, I copied a worksheet with a table to another book, and did a global replace to remove references to the original book in the table formulas, but there was still a link. I found two ways to remove the link.
- Convert the table to a range, then convert back to a table (means you then have to fix all the formulas to be table formulas)
- Go into one of the formulas and fill the formula to the whole column
Even though there were multiple columns with similar formulas, only one column retained the link, possibly because it contained 9 levels of nested XLOOKUPs.
- Brock1895Copper Contributor
This may have been covered by someone else but I didn't see it covered so I'll mention:
I had a ghost link that turned out to be a macro from an old workbook. I must have copied over an object from that old workbook (linked to run a macro within the old workbook). In the new workbook it was trying to find the macro from the old workbook (but the old workbook had been subsequently moved). To correct the issue I simply changed the macro linked to that object to a macro that actually existed in the new workbook.
- claudia.loCopper Contributor
Hi
I've experience of such when there are name range setting contain reference from other file. Use 'Defined Names' functions under 'Formulas' tab and check if there are range name addressed from other files.
Regards
Claudia
- M-MillerCopper ContributorMine was a Defined Name in the Formulas tab. thanks claudia.lo
- guitarkennCopper Contributor
I had multiple phantom links and none of them showed up in the Find and Replace dialog box. I was able to get rid of some of the phantom links with Name Manager, but I figured out that Name Manager does not show names which are on hidden sheets. So, unhide all sheets in your workbook, then go to Name Manager and delete all bad references. Then re-hide the sheets you want hidden. Also, you may have to check if your workbook has Very Hidden sheets (yes, that is a real thing which is different from Hidden sheets) and unhide these too, otherwise they will not show up in Name Manager.
Hope this saves someone else some time.
- Keely_Gilmore5701Copper ContributorClaudia! YOU RE THE WINNER!!! I've been going CrAzY trying to find this. It's in all my financial statments... YES I use excel for this. UGH
Thank YOU!
Keely - Scott BurtonCopper ContributorNames Manager was the trick I was looking for! Thanks Claudia from 4 years ago! I had a host of buried link references in the names manager....and they were not visible anywhere else on the sheet.
- Detlef_LewinSilver Contributor
Hi Wendy
Possible ways to look for links in workbooks
- Search for file types (e.g. xls, xlsx, xlsm).
- Name Manager
- Conditional formatting (>= XL2010)
- Data validation (>= XL2010)Links:
http://blog.contextures.com/archives/2013/11/12/find-external-links-in-an-excel-file/
http://www.exceldashboardtemplates.com/how-to-fix-security-links-warnings-in-an-excel-spreadsheet/
http://nhsexcel.com/how-to-break-resistant-external-links-in-excel/
http://superuser.com/questions/915270/force-external-link-in-excel-to-break-if-the-file-cant-be-found
http://www.manville.org.uk/software/findlink.htmThis utility that Detlef_Lewin linked to is very useful
http://www.manville.org.uk/software/findlink.htm
- SMattaJrCopper Contributor
Wyn Hopkins the Add-in worked fine for my Excel 2010 spreadsheet. I couldn't open it to use once only. Had to install as an Add-in. Thank yall for the help specially to the author @Detlef Lewin.
I use Spreadsheet Compare 2016 from Office 2016 package. Quite often (but not always) it helps
- save file with another name
- break links in it
- compare with above tool initial and latest files
it shows the difference cell by cell