Get rid of those annoying links

You have probably experienced it… you open an Excel file and get a message that the file is linked to one or more external sources.

Gary Knott | how2excel - Excel Schulungen annoying links

If this was not expected, it could be that the file contains unintentional links which you may wish to review and remove. This is not always an easy task as there are at least six ways an Excel file can be linked to another source and not all of them allow easy removal. Let’s go through them in turn.

  1. Formulas

    This is the easiest one to find and fix. Go to Data, Edit links… there you can see the files linked to and if the links are simply in formulas, you can click on “break links” to replace the formulas with values.

    Warning: You may not want to replace formulas with values. E.g. you copied a formula from another version of the file, and this was linked to a sheet called “inputs”. The copied formula in the new file is linked to the sheet “inputs” in the old file. What you really want is for the formula to link to the sheet called “inputs” in the current file. You can search for the file name (in this example “Source file”) in the spreadsheet, then review and amend the formulas found to remove the superfluous path and file name of the old file.

    If the formulas are not simple links to single cells in the source file but are more complex e.g. using SUMIFS then “break links” doesn’t always work. It also doesn’t work if one or more of the other linkage types exist, so I cover these below.

  2. Range names 

    These are also easy to find. Go to Formulas, Name Manager.

    Gary Knott | how2excel - Excel Schulungen annoying links

    There you can see if any range names refer to cells in other spreadsheets and edit or delete them accordingly. If necessary, search for the range name in the spreadsheet to find where it is used and amend or replace the range name as appropriate.

    Other linkages can arise if you copy content from another spreadsheet. The content stays linked to the data in the original spreadsheet… a link to an external file.

  3. Chart data
  4. Pivot table data
  5. Conditional formats
  6. Data validation
  7. Objects e.g.
    (i) a shape containing text linked to a cell
    (ii) a data slicer for a pivot table or a table
    (iii) a VBA control such as a button linked to a macro

These can be tricky to find, so try to work smarter not harder. What have you copied or otherwise changed in the spreadsheet since you opened it last time and didn’t get a message that the file was linked to one or more external sources? Then this is likely to be the cause of the link and can make it easier to find. Review those elements and you can maybe find and amend / remove the link as appropriate.

If that doesn’t help you, then you can find and review each element (e.g. each graph) in turn. Charts and pivot tables are easy to identify. You can find conditional formats and data validation using F5 (goto), special, then select conditional formats or data validation and OK.

Gary Knott | how2excel - Excel Schulungen annoying links

The relevant cells on the selected sheet are then marked, and you can review them: Home, Conditional Formatting, Manage Rules or Data, Data Validation. Repeat for other sheets.

The brute force method

If that fails, and your spreadsheet is large then a brute force method may be the only way to identify the links. Very important: Make a back-up copy of your spreadsheet file for safety. Also make a copy of it to work on. You will have to partially destroy this file, so it is important to work on a copy only. In the copy file, start by selecting one or more sheets and either move them to a new workbook or alternatively delete them: right-click on a tab name and select 'Move or copy' or 'Delete'. Then save the file. See if the links remain. Sometimes it is necessary to close and reopen the file to force Excel to review the links.

  • If the links are gone, they were in one or more of the sheets you moved or deleted. Move some sheets back into the main file or make another copy of the original Excel file and repeat the process, but delete fewer sheets. Do this until you have identified the offending sheet.
  • If the links are not gone, move or delete more sheets then save and if necessary close and open the file until you identify the offending sheet.

 
Now you know a sheet with one or more links. You can then review the graphs, pivot tables, conditional formatting and data validation on this sheet. If the sheet is very large, you may need to move or delete sections of it (like the sheets move/deletion approach above) to narrow down where the external links are.

Once you find the link, open the original file and amend or remove the link there. Then save, close and reopen the file. If Excel still reports that there are external links, you will have to repeat the above steps in a new copy of the original file until you find and amend or remove all the links in the original file.

Good hunting!

Massively reduce the size of your large Excel files

Large files are time-consuming to work with and prevent efficient working so it’s worth trying to get them smaller. The screenshot shows a file I quickly reduced in size by over 80% using my TOP TIPS.

Gary Knott | how2excel - Excel Schulungen Large Excel-files

My TOP TIPS are easy to use...

  1. Save your file in binary format
    File, save as…. then under “Save as type” select “Excel Binary Workbook" or "*.xlsb”.

    Note: this tip reduces the file size taken up on your hard drive or server and also helps when sending files by e-mail. But it still takes up the same size in memory when it is open. Nevertheless, I find it very useful.

    I have been successfully using it for many years and have only identified one disadvantage: Power Query cannot directly read the sheets in an XLSB file. If you want to get your file back into XLSX or XLSM format, simply open the file and "save as" the desired file type.

  2. Prevent duplicate data storage in pivot tables
    Right-click in pivot table and select “PivotTable options”.
    Select Data tab and deselect “Save source data with file”.
      -->

  3. Delete unused columns and rows
    Use Ctrl-End on each sheet – Excel saves all cells up to here.
    If this includes many blank rows and/or columns, then delete them.
    Important: first make a back-up copy then unhide any hidden rows or columns to be sure that you can see everything that you are about to delete.

    Further tips

  4. Reduce or remove lookups or links to external files, especially those with long path names
    Copy formulas and paste as values (to replace the formulas) or move the source data in to the workbook (right click on source sheet then “move…” the sheet to main workbook).

  5. Remove unnecessary formatting including conditional formatting on large areas
    You can review and possibly delete conditional formatting rules individually.

    --> Or you can clear them all from selected cells or an entire sheet all at once.

  6. Check for hidden sheets, unhide and delete if necessary
    Right-click on a tab name and see if the “unhide” option can be used.

    Unhide, review and delete e.g. old unused sheets.

  7. Use Microsoft's "Check Performance" Tool
    Microsoft have created a new tool to help you investigate and fix slow workbooks. It’s called “Check Performance” and at the time of writing (October 2022) it is currently only available for Office 365 subscribers in Excel for the Web. But you can analyse and fix an Excel file there, then continue to use it in desktop Excel.

    Read more details in the Microsoft blog.