Forum Discussion

Wendy Goeminne's avatar
Wendy Goeminne
Copper Contributor
Mar 21, 2017

"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

  • JohnTjia's avatar
    JohnTjia
    Copper 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 Validation

    5. 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


    • trangvv's avatar
      trangvv
      Copper 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_Turner's avatar
      Ben_Turner
      Copper 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.

      1. 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)
      2. 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.

  • Brock1895's avatar
    Brock1895
    Copper 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.lo's avatar
    claudia.lo
    Copper 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

      • guitarkenn's avatar
        guitarkenn
        Copper 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_Gilmore5701's avatar
      Keely_Gilmore5701
      Copper Contributor
      Claudia! 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 Burton's avatar
      Scott Burton
      Copper Contributor
      Names 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.

Resources