Removing hyperlinks from a whole column

  • Thread starter Thread starter Craig Thomson
  • Start date Start date
C

Craig Thomson

I have recently cut and paste a table from a web page into a
spreadsheet. Unfortunately it has also copied in the link information
as well. This drives me nuts, as whenever I click on the cell my
browser opens. I have no need for the link so want to get rid of it.

I can remove the link on an individual cell by right-clicking and
selecting Hyperlink->Remove Hyperlink. However I cannot find a way to
do this for the entire column at once.

Thanks for any suggestions.

Craig
 
try this

Sub HyperlinksOut()
ActiveSheet.columns(activecolumn).Hyperlinks.Delete


End Sub
 
Craig,

This code could to it, select the range where the links
are and run it.

Sub Remove_hyperlink()
Dim i As Integer
Dim myRange As Range

Set myRange = Selection
With myRange
For i = 1 To .Rows.Count
Selection.Hyperlinks.Delete
ActiveCell.Offset(1, 0).Range("A1").Select
Next i
End With
End Sub

HTH,
Felipe
 
Craig,

I can't figure out how to do it in Excel either, but you can easily do it in the VBA Editor:

- select the column with the hyperlinks
- open the VBA Editor - Alt+F11
- find or open the Immediate Window and enter
Selection.Hyperlinks.Delete
and press Return

If you need to do this on a regular basis, you may need a macro.

HTH
Anders Silvén
 
Back
Top