Spreadsheet 123 Excel 2003, XP, 2000, 97 FAQs: Extract Hyperlink

Extract hyperlink address (web addresses ONLY) in Excel 2003/XP/2000/97

Question:  I've downloaded a table from the web with hyperlink references into Excel 2003/XP/2000/97. What I need to do is examine the hypertext link and extract a small part of that link. All I seem to get is the details of the link in a pop up box (yellow) and any attempt to filter out detail only results in the display of the destination ?


Is there a way I can examine a hyperlink details without invoking the hyperlink?




Answer:  Below is a function that you can include in your spreadsheet to extract the hyperlink address from a cell in Excel.


Function HyperLinkText(pRange As Range) As String


Dim ST1 As String
Dim ST2 As String


If pRange.Hyperlinks.Count = 0 Then
  Exit Function
End If


ST1 = pRange.Hyperlinks(1).Address
ST2 = pRange.Hyperlinks(1).SubAddress


If ST2 <> "" Then
  ST1 = "[" & ST1 & "]" & ST2
End If


HyperLinkText = ST1

End Function


Then you can reference this new function in your spreadsheet.
For example in cell B1, you could enter the following:

=HyperLinkText(A1)

Suggested Reading

Spreadsheet News



Forum


Meet advanced users of MS Excel and Spreadsheet and do not be shy to ask your question.


Book Shop


Visit our busy book shop, were you can find latest books for beginners as well as advanced users of excel and similar programs.



Software Library




Excel & Spreadsheet Online Tutorials




Spreadsheet123
Home | About Us | Our Services | Software | Excel Templates | Excel Tutorials | Useful Links | Site Map | Contact Us
Bookmark this PageBookmark this Page

Link To Us
Home
About Us

Book Shop

Excel
Excel Tutorials
Financial Modeling
Excel Templates

Excel Tutorials

Excel Basic Tutorial
Excel Tech on Net
MS Excel Tutorials and Projects
MS Excel Spreadsheet Tutorial
How to Decide What Chart Type to Use
How To Merge Cells in Excel
Excel - Printing Effectively from Excel
Using Excel Functions and Creating Formulas

Excel Templates

Corporate finance spreadsheets
Valuation Inputs Spreadsheets
Big-picture valuation spreadsheets
Focused valuation spreadsheets
Financial Service firms
Troubled firms
Private companies
Young and high-growth firms
Multiples
Valuation in Acquisitions
Valuation of other assets
Value Enhancement Spreadsheets
Basic option pricing models
Real option models in corporate finance
Real option models in valuation
Hotel & Restaurant Management Spreadsheets
Real Estate & Mortgage Excel Spreadsheets
Excel Personal Budget Spreadsheets
More Spreadsheets

Software Library

Accounting Software
Small Business Software
Tax Calculating Software
Auditing Software
Excel Add-Ins
Property Management Software
Payroll Software
Spreadsheet Software

Contact Us
Useful Links
Our Services
Site Map