Finding hyperlinks in a spreadsheet

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
 
M

Michael Bednarek

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top