Finding hyperlinks in a spreadsheet

  • Thread starter Thread starter JDR - Hotmail
  • Start date Start date
J

JDR - Hotmail

I'm using Excel 2007 and have a spreadsheet of name, addresses, email
address and URL's

Some of the email and URL addresses are not formatted correctly so they
don't generate as a hyperlinked value in a cell.

Is there a way to sort or find all the cells that contain a hyperlinked
value?

Thanks
 
I'm using Excel 2007 and have a spreadsheet of name, addresses, email
address and URL's

Some of the email and URL addresses are not formatted correctly so they
don't generate as a hyperlinked value in a cell.

Is there a way to sort or find all the cells that contain a hyperlinked
value?

Try this:
Sub ListHyperlinks()

Dim rngCell As Range

With ActiveSheet
For Each rngCell In .Range("A1", .Cells.SpecialCells(xlCellTypeLastCell))
If rngCell.Hyperlinks.Count > 0 Then
Debug.Print rngCell.Address & " = " & rngCell.Hyperlinks(1).Name
End If
Next rngCell
End With
End Sub
 
Back
Top