+ Reply to Thread
Results 1 to 6 of 6

link to a hyperlink cell

  1. #1
    J.
    Guest

    link to a hyperlink cell

    Dear all,

    A1 = hyperlink ("http://www.google.com/","link")
    A2 = A1
    Then A2 doesn't have the hyperlink, how can i get it?

    Many thanks

    J.F.



  2. #2
    README.TXT
    Guest

    Re: link to a hyperlink cell

    It is not so good but works:



    A1 = hyperlink ("URL";"URL")
    -> So the link will appear as the
    URL itself

    Then:

    A2 = hyperlink(A1)




    Greetings,

    readme.txt



    "J." <F.> escreveu na mensagem news:[email protected]...
    > Dear all,
    >
    > A1 = hyperlink ("http://www.google.com/","link")
    > A2 = A1
    > Then A2 doesn't have the hyperlink, how can i get it?
    >
    > Many thanks
    >
    > J.F.
    >
    >




  3. #3
    David McRitchie
    Guest

    Re: link to a hyperlink cell

    The problem was to have the same hyperlink in A2 as in A1,
    and there is no Excel solution for that. You would need to use
    a User Defined Function, or possibly an Event Macro.

    With more details as to how you create the hyperlink in A1,
    there might be better alternatives for doing the same for A2.
    Some ideas follow:

    with concatentaion you could use
    E1: 'google
    A1: =HYPERLINK("http://www." & E1 & ".com",E1)
    A2: =HYPERLINK("http://www." & A1 & ".com",A1)

    with an Event Macro such as the following --
    to install: right-click on worksheet tab, view code,
    insert code (only have one option explicit and it must
    be the first line). This way you can double-click
    of what you see i.e. the word "google" and hyperlink
    out to "http://www.google.com" in a new window.
    Close the window and you your Excel applicaiton should
    again be the active window.

    Option Explicit
    Private Sub Worksheet_BeforeDoubleClick(ByVal _
    Target As Range, Cancel As Boolean)
    Dim hlink As String
    Cancel = True 'Get out of edit mode
    'If Target.Column <> 1 Then Exit Sub
    hlink = "http://www." & Target.Text & ".com"
    ActiveWorkbook.FollowHyperlink _
    Address:=hlink, NewWindow:=True
    End Sub

    Another example perhaps a little closer to what you had so that
    you don't simple repeat the hyperlink name shown in another cell.
    If [x] is not clear that it is a link use [link]

    A1: 'google
    B1: =HYPERLINK("http://www." & A1 & ".com","[x]")
    A2: =A1
    B2: =HYPERLINK("http://www." & A2 & ".com","[x]")

    Additional references:
    http://www.mvps.org/dmcritchie/excel....htm#hyperlink
    http://www.mvps.org/dmcritchie/excel...ollowhyperlink
    http://www.mvps.org/dmcritchie/excel....htm#hyperlink
    http://www.mvps.org/dmcritchie/excel...tm#useyourname
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    >
    > "J." <F.> wrote ...
    > > A1 = hyperlink ("http://www.google.com/","link")
    > > A2 = A1
    > > Then A2 doesn't have the hyperlink, how can i get it?




  4. #4
    J.
    Guest

    Re: link to a hyperlink cell

    Thanks

    "David McRitchie" <[email protected]> wrote in message
    news:[email protected]...
    > The problem was to have the same hyperlink in A2 as in A1,
    > and there is no Excel solution for that. You would need to use
    > a User Defined Function, or possibly an Event Macro.
    >
    > With more details as to how you create the hyperlink in A1,
    > there might be better alternatives for doing the same for A2.
    > Some ideas follow:
    >
    > with concatentaion you could use
    > E1: 'google
    > A1: =HYPERLINK("http://www." & E1 & ".com",E1)
    > A2: =HYPERLINK("http://www." & A1 & ".com",A1)
    >
    > with an Event Macro such as the following --
    > to install: right-click on worksheet tab, view code,
    > insert code (only have one option explicit and it must
    > be the first line). This way you can double-click
    > of what you see i.e. the word "google" and hyperlink
    > out to "http://www.google.com" in a new window.
    > Close the window and you your Excel applicaiton should
    > again be the active window.
    >
    > Option Explicit
    > Private Sub Worksheet_BeforeDoubleClick(ByVal _
    > Target As Range, Cancel As Boolean)
    > Dim hlink As String
    > Cancel = True 'Get out of edit mode
    > 'If Target.Column <> 1 Then Exit Sub
    > hlink = "http://www." & Target.Text & ".com"
    > ActiveWorkbook.FollowHyperlink _
    > Address:=hlink, NewWindow:=True
    > End Sub
    >
    > Another example perhaps a little closer to what you had so that
    > you don't simple repeat the hyperlink name shown in another cell.
    > If [x] is not clear that it is a link use [link]
    >
    > A1: 'google
    > B1: =HYPERLINK("http://www." & A1 & ".com","[x]")
    > A2: =A1
    > B2: =HYPERLINK("http://www." & A2 & ".com","[x]")
    >
    > Additional references:
    > http://www.mvps.org/dmcritchie/excel....htm#hyperlink
    > http://www.mvps.org/dmcritchie/excel...ollowhyperlink
    > http://www.mvps.org/dmcritchie/excel....htm#hyperlink
    > http://www.mvps.org/dmcritchie/excel...tm#useyourname
    > ---
    > HTH,
    > David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    > My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    > Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
    >
    > >
    > > "J." <F.> wrote ...
    > > > A1 = hyperlink ("http://www.google.com/","link")
    > > > A2 = A1
    > > > Then A2 doesn't have the hyperlink, how can i get it?

    >
    >




  5. #5
    J.
    Guest

    Re: link to a hyperlink cell

    Thanks

    "README.TXT" <delete*.txt> wrote in message
    news:%[email protected]...
    > It is not so good but works:
    >
    >
    >
    > A1 = hyperlink ("URL";"URL")
    > -> So the link will appear as the
    > URL itself
    >
    > Then:
    >
    > A2 = hyperlink(A1)
    >
    >
    >
    >
    > Greetings,
    >
    > readme.txt
    >
    >
    >
    > "J." <F.> escreveu na mensagem

    news:[email protected]...
    > > Dear all,
    > >
    > > A1 = hyperlink ("http://www.google.com/","link")
    > > A2 = A1
    > > Then A2 doesn't have the hyperlink, how can i get it?
    > >
    > > Many thanks
    > >
    > > J.F.
    > >
    > >

    >
    >




  6. #6
    David McRitchie
    Guest

    Re: link to a hyperlink cell

    You're welcome, but I think since you got at least four
    different possibilities it would be helpful to know how
    close any of the answers were to what you wanted. (feedback)

    "J." <F.> wrote ...
    > Thanks
    >
    > "David McRitchie" <[email protected]> wrote
    > > Additional references:





+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1