If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Extract hyperlink string from excel cell
Forgive my ignorance but I haven't done a lot of work with Excel VBA.
So do I just have to paste the function into the VBA window and then add =HyperLinkText(CellName) on my worksheet cell? Thanks Ryan Bill Manville wrote: Markus Riester wrote: Is there a function that is available (I didn't find one in the standard functions Excel offers), or does anyone have a macro? Something like this? Function HyperLinkText(oRange As Range) As String Dim ST1 As String, ST2 As String If oRange.Hyperlinks.Count = 0 Then Exit Function ST1 = oRange.Hyperlinks(1).Address ST2 = oRange.Hyperlinks(1).SubAddress If ST2 "" Then ST1 = "[" & ST1 & "]" & ST2 HyperLinkText = ST1 End Function Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - respond to newsgroup |
#2
|
|||
|
|||
Ryan Sapien wrote:
So do I just have to paste the function into the VBA window and then add =HyperLinkText(CellName) on my worksheet cell? Yes In the VB editor you need to Insert / Module if there are no standard modules already in your workbook. Then paste the code into that module. Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - respond to newsgroup |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Windows in Taskbar | Chevy | General Discussion | 8 | October 15th, 2004 03:57 PM |
How to display a very very large text in on Excel Cell | Andy | General Discussion | 6 | August 20th, 2004 01:14 PM |
Linking to a specific sheet in HTML version of excel spreadsheet. ? | rband | General Discussion | 4 | August 5th, 2004 08:41 PM |
Excel 2000 converts UNC links to relative - need to preserve UNC links! | Jeff Adams | Links and Linking | 3 | April 15th, 2004 05:46 PM |
Convert a Cell Reference to Text | Chuck Buker | Worksheet Functions | 6 | September 22nd, 2003 05:04 PM |