Incorrect Links after Sorting Hyperlinks

by Allen Wyatt
(last updated April 12, 2014)


Susan has a worksheet with cells hyperlinked to corresponding PDF documents. The hyperlinks work fine until she attempts to perform any type of sorting on the data in the worksheet. After sorting, the hyperlinks are linked to incorrect documents.

This is, apparently, a problem with Excel under some circumstances. According to Microsoft, this occurs if you copy and paste cells containing hyperlinks and then sort the pasted cells. You can find out a bit more about this problem at the following Knowledge Base page:

The problem is, the only solution noted by Microsoft is to manually correct the hyperlinks after doing the sort that created the messed-up links. In other words, there isn't a real solution.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13063) applies to Microsoft Excel 2007, 2010, and 2013.

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


Triple-Spacing Your Document

Print your document with lots of space between each line—triple space it! Here's some quick and easy steps for getting ...

Discover More

Editing the Custom Spelling Dictionaries

When spell-checking a worksheet, Excel relies on both built-in and custom dictionaries. Here's how to edit the content of ...

Discover More

Modifying How Windows Notifies You of Impending Changes

Part of the security system built into Windows involves notifying you when changes are about to occur to your system. Here's ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Sorting Data on Protected Worksheets

Protect a worksheet and you limit exactly what can be done with the data in the worksheet. One of the things that could be ...

Discover More

Sorting Dates by Month

Sorting by dates is easy, and you end up with a list that is in chronological order. However, things become a bit more tricky ...

Discover More

Sorting Dates and Times

One of the strong features of Excel is its ability to sort information in a worksheet. When it doesn't sort information as ...

Discover More

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

View most recent newsletter.


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 7 - 0?

2017-04-16 08:06:19


Open Office 4.1.1 can do this sort OK. Microsoft should go figure how they can do it for free.

2016-01-29 13:55:54


I think the issue still exists in Excel 2010. I copied and pasted hundreds of hyperlinks and they are messed up after sorting the spreadsheet. :(

2015-07-17 14:08:14


My hyperlinks are in a project dashboard and are never subject to getting sorted. But they still get broken.
My links generally are to a specific project folder or document on the server that never move.

2015-06-05 06:36:08


I use Hyperlinks from one cell to another in the same file. If I sort the date, the hyperlinks are all messed up. Is there a workaround?

2015-04-08 09:32:13


Put the time into to create each hyperlink individually (do not copy a hyperlink) and it will sort fine!

2014-10-07 10:09:39


Were you able to test barouh's solution?

Creating the hyperlink using the HYPERLINK() function will "display" the named document (in my case a pdf file) but it does not open it; whereas using the "Hyperlink" from the ribbon Insert tab/Links group and "inserting" a hyperlink, automatically will open the pdf file I'm hyperlinking to. I hope this makes sense...
So, I guess the moral of the story is you have a choice: you can either choose to display only the named document you're linked to and leave it to the end user to open the document for viewing and you can keep the sort function performing properly (OR) you can have your linked document open automatically and choose to never be able to use the sort function without breaking all your hyperlinks...not a very fair trade-off if you ask me! Using Excel 2013, and with Microsoft knowing about this already PRIOR to Excel 2007, you would have thought Microsoft would have fixed this by now.

2014-06-03 23:44:18


This is absurd. I really need these links, I have hundreds of rows, and I can't manually repair each link every time I sort. What, if anything, was Microsoft thinking?

You said something really intriguing, but I couldn't quite understand. Could you please say again what you did to prevent the hyperlinks from being separated from their cells during sorting?

2014-04-16 18:59:04


My version of Excel is 2013. However, I previously was using version 2010 and experienced the same hyperlink issues.
When I create the hyperlink I simply right click on the cell and choose "hyperlink" and continue the process from there.
I do not cut/copy and paste the hyperlinks...I create all of them using the hyperlink wizard .

2014-04-16 10:42:54

Glenn Case


It appears to be fixed in 2010; at least I just tried cutting/pasting a list of hyperlinks, then soprting, and the hyperlinks still referred to the correct file.

2014-04-14 02:28:29


This is not a solution to repair the mess after the sorting, but at least easy way to prevent such problems in future: if hyperlink addresses are stored in separate column just as text values, and active hyperlinks are created by HYPERLINK() function, referring to that column with text values, than - I believe - sorting will not break anything

2014-04-12 10:37:07


Was this problem fixed in Excel 2010? The Knowledge Base article says it applies to all version of Excel through 2007, but the last review date for the article was January 16, 2007!

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

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.