Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Converting Hyperlink formulae to real hyperlink


Hi there,

I have the following formulae =HYPERLINK("mailto:"&J2,A2)
which creates a working hyperlink.
Problem is I need to move this data to another spreadsheet - If I copy
and paste values it looses the hyperlinking abilities...
question How can I take this hyperlinked formulae and paste it as a
value (ie that does not refer to the other cells), but still works as a
hyperlink...

Regards

D

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Converting Hyperlink formulae to real hyperlink

worksheets("sheet2").Formula =
"=Hyperlink(""mailtto:""&Sheet1!J2,Sheet1!A2)"

create a hyperlink with the macro recorder on. Turn it off, then look at
the recorded code. Get the information from your source sheet to supply to
the arguments of the code you recorded.

--
Regards,
Tom Ogilvy


"Darin Kramer" wrote:


Hi there,

I have the following formulae =HYPERLINK("mailto:"&J2,A2)
which creates a working hyperlink.
Problem is I need to move this data to another spreadsheet - If I copy
and paste values it looses the hyperlinking abilities...
question How can I take this hyperlinked formulae and paste it as a
value (ie that does not refer to the other cells), but still works as a
hyperlink...

Regards

D

*** Sent via Developersdex http://www.developersdex.com ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Converting Hyperlink formulae to real hyperlink

Assuming that your hyperlink formulas all have the same format (one cell to
carry the email address and another cell to carry the display name), then:

Sub hyper_verter()
'
' gsnu
'
dq = Chr(34)
v = Selection.Formula
v = Replace(v, dq, "")
v = Replace(v, " ", "")
v = Replace(v, "=HYPERLINK(mailto:&", "")
v = Replace(v, ")", "")

st = Split(v, ",")
part1 = Range(st(0)).Value
part2 = Range(st(1)).Value

Sheets("Sheet2").Activate
Set r = Range("B9")
With ActiveSheet
..Hyperlinks.Add Anchor:=r, Address:="mailto:" & part1, TextToDisplay:=part2
End With
End Sub

this macro:

1. gets the formula from the Selected cell
2. gets the address references from the formula
3. gets the email address and display name from the references
4. goes to Sheet2
5. inserts a non-formula hyperlink in cell B9

Put whatever looping structure around this code you desire.
--
Gary''s Student - gsnu2007


"Darin Kramer" wrote:


Hi there,

I have the following formulae =HYPERLINK("mailto:"&J2,A2)
which creates a working hyperlink.
Problem is I need to move this data to another spreadsheet - If I copy
and paste values it looses the hyperlinking abilities...
question How can I take this hyperlinked formulae and paste it as a
value (ie that does not refer to the other cells), but still works as a
hyperlink...

Regards

D

*** Sent via Developersdex http://www.developersdex.com ***

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Converting Hyperlink formulae to real hyperlink



Gary - it gets stuck on the part 1....?

My hyperlink formulae is in column K - I wouldent mind the resutl in
column L...

Regards

D

*** Sent via Developersdex http://www.developersdex.com ***
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Converting Hyperlink formulae to real hyperlink



Gary,

For whatever (unknown!) reason, mine stops on the line Part 1!!!

Regards

D



*** Sent via Developersdex http://www.developersdex.com ***
Reply
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
converting hyperlink to actual web address Roger on Excel Excel Discussion (Misc queries) 9 October 29th 08 12:25 AM
How do you keep a hyperlink active after converting to a PDF? trainer07 Excel Discussion (Misc queries) 4 December 11th 07 09:53 PM
hyperlink between sheets not working after converting to pdf LTJ Excel Discussion (Misc queries) 1 October 8th 07 04:06 PM
Converting Text to a hyperlink Darin Kramer Excel Programming 4 September 28th 07 01:43 AM
converting hyperlink paths Bill Sigl Excel Discussion (Misc queries) 2 May 16th 05 10:20 AM


All times are GMT +1. The time now is 04:23 PM.

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

About Us

"It's about Microsoft Excel"