Microsoft KB Archive/180700

= Hyperlinks are removed or refer to wrong address after you sort them in Excel =

Article ID: 180700

Article Last Modified on 11/19/2007

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition
 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q180700





SYMPTOMS
If you sort a range of cells in a worksheet that contains hyperlinks, the following problems may occur:


 * Some of the hyperlinks are removed. Although the blue, underlined text appears in the cell, nothing happens when you click the cell.
 * Some of the hyperlinks may be changed so that they refer to the wrong addresses. For example, a hyperlink that previously referred to one Web page may refer to a different Web page.



CAUSE
This problem may occur if you copy and paste cells that contain hyperlinks, and then sort the cells.



RESOLUTION
If this problem occurs, manually correct the hyperlinks. To do this, do either of the following:
 * If Microsoft Excel has removed the hyperlink from the cell, select the cell and click Hyperlink on the Insert menu. Enter the correct address in the Link To File Or URL box, and then click OK. -or-
 * If the hyperlink refers to the wrong address, right-click or press CONTROL and click the cell, point to Hyperlink on the shortcut menu, and then click Edit Hyperlink. Correct the address in the Link To File Or URL box and click OK.

If you need to fix a list of e-mail addresses, highlight the list of addresses, and then run the following macro. Sub test Dim cell As Range For Each cell In Selection If InStr(1, cell.Value, "@") > 0 Then ActiveSheet.Hyperlinks.Add cell, "mailto:" & cell.Value, cell.Value End If Next End Sub



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

Additional query words: XL97 XL98 incorrect wrong

Keywords: kbbug KB180700

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.