Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Replacing Links with Values.

Replacing Links with Values

by Allen Wyatt
(last updated December 11, 2018)

2

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:

  1. Display the Data tab of the ribbon.
  2. Click the Edit Links tool, in the Connections group (Excel 2007, Excel 2010, or Excel 2013) or in the Queries & Connections group (Excel 2016 and later versions). Excel displays the Edit Links dialog box. (See Figure 1.)
  3. Figure 1. The Edit Links dialog box.

  4. Select the links in the dialog box.
  5. Click Break Links and acknowledge that you really want to break the selected links.
  6. Click OK.

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:

  1. Select the cells that contain links.
  2. Press Ctrl+C.
  3. Display the Paste Special dialog box. (On the Home tab of the ribbon click the down-arrow under the Paste tool and choose Paste Special.) (See Figure 2.)
  4. Figure 2. The Paste Special dialog box.

  5. Click the Values radio button.
  6. Click OK.

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:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

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 Office 365. You can find a version of this tip for the older menu interface of Excel here: Replacing Links with Values.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Character Limits for Cells

Excel places limits on how much information you can enter into a cell and how much of that information it will display. ...

Discover More

Changing Shortcut Properties

Want to change how a shortcut behaves when you double-click it? Just display the Properties dialog box for the shortcut ...

Discover More

Permanently Removing Blue Squiggly Underlines

Word's grammar checker can helpfully mark grammar goof-ups as you type. When you pass your document on to another person, ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Getting Rid of Workbook Links

Excel allows you to easily link information from one workbook to another. If you want to get rid of links that may be ...

Discover More

Removing Hyperlinks without a Macro

If you have a whole slew of hyperlinks in a worksheet and you want to get rid of them, it's easier than you think. This ...

Discover More

Updating Links

When you establish links between data on a target worksheet and data on a source worksheet, those links are typically ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four less than 4?

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?


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.