Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel website column hyperlinks to an email addrss

Status
Not open for further replies.

dgillz

Instructor
Mar 2, 2001
10,038
US
OK I've inherited huge customer/prospect spreadsheet with 7,000 records, one of the columns is website. I have found several instances where the physical data says but the link is to an email address, for example johnqpublic@mycompany.com. This is an easy fix, but it is not so easy to find these inconsistent hyperlinks. Is there a way to search for or filter the data where the hyperlink is not the same as the physical data in the cell? I am open to VBA solutions as well.

Any insights appreciated.

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Macola 10, Synergy, and Crystal Reports.
Check out our Macola tools:
 
Try this little User Defined Function as your formula:

Code:
Function CheckHyperLink(ByRef r As Range) As String

If Range(r.Address).Value = Range(r.Address).Hyperlinks.Item(1).Address Then
    CheckHyperLink = "The Same"
Else
    CheckHyperLink = "Different"
End If

End Function

So if you have your Hyperlink in cell A2, in B2 type: [tt]=CheckHyperLink(A2)[/tt]

You may need to modify the function to fit your needs.

I was working with this basic, little code to enter the hyperlinks into 2 cells:

Code:
Sub AddLink()

With Application
    .ActiveSheet.Hyperlinks.Add .ActiveSheet.Range("A2"), "[URL unfurl="true"]http://google.com/",[/URL] , , "Click Here"
    .ActiveSheet.Hyperlinks.Add .ActiveSheet.Range("A3"), "[URL unfurl="true"]http://msn.com/",[/URL] , , "[URL unfurl="true"]http://msn.com/"[/URL]
End With

End Sub

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
dgillz,

Did you ever get this squared away?


"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top