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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Building Hyperlink from Cell Text... 2

Status
Not open for further replies.

BFreshour

Programmer
Mar 20, 2002
84
Hi,

The only way I know on the sheet is to Edit Hyperlink.

But...

in VBA...
Code:
    For Each hlk In ActiveSheet.Hyperlinks
        With hlk
            .TextToDisplay = .Parent.Offset(0, -1).Value
        End With
    Next
Hope this Helps :)


Skip,
Skip@TheOfficeExperts.com
 
Hi BFreshour,

ETID has exactly the right idea but he missed off the important bit!

Code:
=HYPERLINK("[URL unfurl="true"]http://"&A1[/URL]
Code:
,"Pretty text for User"
Code:
)

Enjoy,
Tony
 
I ended up using the following macro code and ran it on every cell I needed:

Dim link As String

With ActiveCell(1)
link = " & ActiveCell(1).Offset(-1, 0).Value & "&Sport=NCAAF"
.Hyperlinks.Add .Range("A1"), link, , , "Bets"
.Font.Size = 7.5

End With

---
But this also works:

=HYPERLINK(" &I9 & "&Sport=NCAAF","Bets")

Thanks,
Brad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top