LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default convert table of hyperlinks

Jake, this may not look to efficient but it will do the job that you
described.

Sub convrt_hyper()
Dim oldHyp As Hyperlink
Dim newHyp As String
Dim HypAdr As String
Dim Hyptxt As String
Dim ln As Long 'string length
Dim cnt As Long 'comma position
Dim rng As Range
Dim Lrow As Long

'in next line change A to the column letter
'where your old hyperlink functions are
Lrow = Cells(Rows.Count, "A").End(xlUp).Row

'change both A's to match column letter in line above
'change the 1 to the rownumber they begin on
Set rng = Range("A1:A" & Lrow)

'the following will put the new hyperlink
' in the next column to the right
For Each oldHyp In rng.Hyperlinks
HypAdr = oldHyp.Address
cnt = InStr(1, HypAdr, ",", vbTextCompare)
ln = Len(HypAdr)
newHyp = Left(HypAdr, cnt - 2)
Hyptxt = Mid(HypAdr, cnt + 2, ln - cnt - 2)
ActiveSheet.Hyperlinks.Add Anchor:=rng.Offset(0, 1), Address:= _
newHyp, TextToDisplay:=Hyptxt
Next oldHyp
End Sub

If this doesn't quite do it for you, we can tweak it to work.
Mike F
"Jakobshavn Isbrae" wrote in
message ...
I have a large table (over 600 entries) of hyperlinks.
They are all in a single column.
They are all of the form:
=HYPERLINK("http://www.something.com","something")
I need to convert the table into a table of hyperlinks without function
calls. The result table would look like it was made by using
Insert=Hyperlink...

I have tried various copy/paste specials and they all failed.

I am not much of a programmer, but I can copy and paste into the VBA
editor.
Thank you in advance for any guidance you give me.
--
jake



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert imported Access Hyperlinks to Excel and KEEP the li Rudeseal Excel Worksheet Functions 0 August 28th 09 10:06 PM
Convert list of URLs to Hyperlinks jabe813 Excel Discussion (Misc queries) 4 January 28th 09 04:13 PM
How to convert web addresses into hyperlinks NeilPSargent Excel Discussion (Misc queries) 3 January 9th 08 04:48 PM
Convert Text to Hyperlinks LeeMax Excel Discussion (Misc queries) 1 November 9th 06 11:01 PM
Macro to convert hyperlinks to text Emece Excel Worksheet Functions 1 December 15th 05 02:16 PM


All times are GMT +1. The time now is 12:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"