Written by Allen Wyatt (last updated December 11, 2018)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
John has a large number of workbooks that have links in them and they are getting very large. He wonders if there is any way for Excel to convert the links to the data grabbed from those links so he can archive the old workbooks.
One thing to try is to open the workbooks that contain the links and then use Excel's tools to break the links. Make sure you keep a backup of your workbook (in case you mess things up) and follow these steps:
Figure 1. The Edit Links dialog box.
The result is that all the links are done away with, but the values last retrieved through the links remain in the workbook.
Another approach is to use Paste Special to "overwrite" your links. (This works well if you have a limited number of links in a worksheet.) Follow these steps:
Figure 2. The Paste Special dialog box.
If you have quite a few links in your workbook, then you will want to use a macro to do the link breaking. The following is an example of a simple macro to do the breaking:
Sub BreakLinks() Dim aLinksArray As Variant aLinksArray = ActiveWorkbook.LinkSources(Type:=xlLinkTypeExcelLinks) Do Until IsEmpty(aLinksArray) ActiveWorkbook.BreakLink Name:=aLinksArray(1), _ Type:=xlLinkTypeExcelLinks aLinksArray = _ ActiveWorkbook.LinkSources(Type:=xlLinkTypeExcelLinks) Loop End Sub
It is important to remember, though, that links can be tricky. Links to other workbooks can be in formulas, names, charts, text boxes, and other objects, both visible and hidden, and in different combinations within formulas and those objects. Getting all the links and breaking them depends on the complexity of your workbook. If you have a complex workbook, then you may benefit by using the FindLink add-in created by Excel MVP Bill Manville. You can find it here:
http://www.manville.org.uk/software/findlink.htm
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7566) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Replacing Links with Values.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Combining workbooks that have cross-links to each other can offer some special challenges. This tip examines how you can ...
Discover MoreIf you need to modify the URL used in a large number of hyperlinks, you can do so by using a macro and a little ...
Discover MoreNeed to create links to many filenames on your system? Here are a couple of quick ways to get just the connection you need.
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2019-03-04 15:42:21
Denis Gibbs
Hi,
i am always cautious about using macros because they may become non-operational with time and their functionality is hidden in the macros programming.
i have a related issue that I searched for on this site, but couldn't see any results that cover it so: Here is my problem and the methods that work most of the time - but i am not convinced it is covers all the bases. I recognise a lot of this will be re-stating what you know, but i have included it to provide a background and welcome an article on this subject:
Occasionally, i get a spreadsheet that has links reported when i open it. i know that Excel maintains a copy of the sheets referred to until the links are broken. i do not like having unidentified links - as
> it is not clear what is being referenced
> if the source sheet is opened, the values linked to may change
> and the Excel file is much larger because it contains a copy of the sheet(s) referenced which also makes it a security risk.
Therefore i like to remove the links:
On simple sheets this will fix the problem:
Edit Links, select the file that is linked to, then select Break Links. Sometime you need to close and reopen the file to confirm the break.
However, sometimes this does not resolve the problem so i review the following:
1. Links on hidden sheets/rows sometimes do not get broken (changes formula to values). So the previous step does not work, until i Unhide.
2. Charts - can contain links if the chart is copied in. Needs close examination of the chart set up and case-by-case fixes.
3. Data validation - Earlier versions of Excel would not allow Data validation to a list on a separate sheet. However, later versions allow you to refer to a separate sheet and therefore you now have Links to a list in a sheet within a separate file.
I am sure there are more that i have fixed by deleting sheets from a copy of the file until the links go away. I would welcome an article that brings this together and identifies any further steps.
Thank you - Denis
2018-11-13 09:12:27
Ken Cameron
Allen, I do quite a bit of spreadsheet work where I copy tabs into my spreadsheet from someone else's spreadsheet. Subsequently, when I open my spreadsheet, it will give me an Edit Links dialogue to a location to which I do not have access. I select the link and do the Break Link thing, but it doesn't go away. I will then open the FIND & REPLACE dialogue, Options = Workbook, and search on something unique in the Link name. However, it searches the entire workbook and still doesn't find the link. How do I find the location in my spreadsheet that is referencing this external link?
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2023 Sharon Parq Associates, Inc.
Comments