+ Reply to Thread
Results 1 to 4 of 4

Hyperlink points to address based on input from 2 cells

  1. #1
    Registered User
    Join Date
    10-14-2011
    Location
    Las Vegas, Nevada
    MS-Off Ver
    Excel 2007
    Posts
    24

    Hyperlink points to address based on input from 2 cells

    When clicking on hyperlink I want it to open in a separate window and take them to a link that is dependent on what has already been inputed in 2 different cells. EXAMPLE:

    If E16 is Male and H16 is over 17 and under 30 then go to this hyperlink Male18-29, but
    if E16 is Male and H16 is over 29 and under 40 then go to this hyperlink Male 30-39, but
    If E16 is Female and H16 is over 17 and under 30 then go to this hyperlink Female18-29, but
    If E16 is Female and H16 is over 29 and under 40 then go to this hyperlink Female 30-39,

    I have a lot more "IF's" to add, but if I can get the first 4 above I can wing it from there. THANK YOU!!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Hyperlink points to address based on input from 2 cells

    To create those strings:

    =E16 & LOOKUP(H16, {0,18,30,40}, {"1-17","18-29","30-39","40+"})

    Now use that as you continue to make your hyperlinks.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-14-2011
    Location
    Las Vegas, Nevada
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Hyperlink points to address based on input from 2 cells

    The formula worked well, thank you.
    However still having a problem getting the links pointed in the right direction. Example:
    When E16 is Male and H16 is over 17 and under 30 then this comes up in the cell as expected: Male18-29, and then I assign it a hyperlink address to worksheer Male 18-29. Still ok.
    However when E16 is Male and H16 is over 29 and under 40 then and Male 30-39, comes up in the cell it still goes to the original place that cell was hyperlinked to Male 18-29, not Male 30-39.
    In other words, I can set a hyperlink to the cell but cannot select the text in the cell to give it different hyperlinks. Should I be using a drop down menu? Is there a way to turn items in drop downs into individual links?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Hyperlink points to address based on input from 2 cells

    are you using the =hyperlink() function?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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