+ Reply to Thread
Results 1 to 14 of 14

Hyperlink to a Value

  1. #1
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Question Hyperlink to a Value

    Hi everyone, I have done a search and found some threads about this, but everything I tried doesnt work, so I figured I'd create a thread to my specific situation.

    What I am trying to do is have a hyperlink go to another sheet after searching the second sheet for the same value. I have a sheet labeled "IQI" which has the total number of cases for a certain condition. I have another sheet labeled "IQI Cases" which lists out each case individually.

    I want to be able to click on the Condidion in the IQI sheet and have that take me to that specific spot in the IQI Cases sheet where the cases for that condition begin. Right now I just have a simple hyperlink to a range of cells. But each month a report is generated and the range will be different and I have to go and change the range each time. So I guess I want a hyperlink and a lookup function combination.

    I dont know if this would be a Macro or a formula.

    Thanks in advance!

  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 to a Value

    Post up your sample workbook so we can see the results desired. Point out where you're hyperlinking and where you'd like to jump to.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    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
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Re: Hyperlink to a Value

    OK, here is an example, I had to remove the data because of HIPAA (I work in a hospital). I just left the conditions I am referring to. So in IQI I want the name or somehow there to be a hyperlink that would take me to the spot in IQI Cases where that conditions cases begin.

    So for example, if I click on Indicator 5 "Coronary artery bypass graft (CABG) volume" I want it to look up in sheet IQI Cases where the first time "Coronary artery bypass graft (CABG) volume" comes up, so that the person who is viewing the report can see the individual cases for each condition, each month, just by clicking on the condition in the IQI sheet.

    Hope that makes more sense.
    Last edited by _Ryan_; 02-04-2010 at 08:26 PM.

  4. #4
    Valued Forum Contributor jj72uk's Avatar
    Join Date
    03-22-2008
    Location
    Essex, England
    MS-Off Ver
    Work - Office 2000, Home - Office 2007E
    Posts
    360

    Re: Hyperlink to a Value

    Maybe something along these lines?

    Instead of searching for the text string search for the indicator number using a macro

    Please Login or Register  to view this content.
    Link the macro to a button and once clicked a prompted box appears, the user enters the indicator number...and.. there we go

  5. #5
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Re: Hyperlink to a Value

    ^ That is great! Is there anyway to make it into a hyperlink? So when they click the Indicator number it goes to that indicator number on another page? If not, this works perfect.

    I have a few more sheets that I would like to use this code for if I cant get a hyperlink...would I just change the part where it says "With Sheets ("IQI Cases") to the sheet I want it to look in?

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Hyperlink to a Value

    I'm not sure you're really going to need VBA here - you could perhaps just use the HYPERLINK function ?

    Obviously there's no file available any longer but based on the prior VBA

    Please Login or Register  to view this content.

    where A1 contains the value to be searched for within Column B on IQI Cases sheet.

    (that said of course depending on how many sheets you need to "iterate" if not found VBA may be a reasonable approach)

  7. #7
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Re: Hyperlink to a Value

    ^ thats perfect. Exactly what I was looking for. I took down the file cuz I didnt want to leave it up too long due to HIPAA (even though I took out specific patient information).

    When I paste the formula into the first indicator number cell (B3) I get "#REF" When I paste it into an empty cell, I get the correct hyperlink.

    Here is the file again...sorry.
    Attached Files Attached Files
    Last edited by _Ryan_; 02-05-2010 at 10:52 AM.

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Hyperlink to a Value

    Ah, you wouldn't be able to put the link over the value in B3 unless you made the value to be found a constant in the formula, eg:

    Please Login or Register  to view this content.

    with that in red being modified in each row - eg B4 uses 2, B5 uses 4 etc...


    If however you were to insert a new column before the current C column you could subsequently hide column B and in the new blank column use:

    Please Login or Register  to view this content.

    ie the above would link to the hidden column to est. the Indicator Number to be found.

    If you prefer to avoid VBA the 2nd option is a good one IMO.

  9. #9
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Re: Hyperlink to a Value

    I tried pasting the second formula into column C, but after its pasted and I click it, it says "reference is not valid"

    When I use the first formula in the above post that works fine. Whats the difference between the two? is one better than the other?

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Hyperlink to a Value

    To avoid confusion see attached:
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Re: Hyperlink to a Value

    I was using the first formula to paste the indicator number over the value in column B. Is that any different from what you did by hiding the column and putting the link in column C? Whats the benefit to doing it that way?

    One of these ways is what I will use!! Thank you so much. You've been a huge help, I really appreciate it. I do have another question about modifying a Macro that has already been created by a colleague. I need it to do something differently. Is that something you can help me with via PM or should I create a new thread for that?
    Last edited by _Ryan_; 02-05-2010 at 11:18 AM.

  12. #12
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Hyperlink to a Value

    The advantage of the 2nd approach is that it's quicker to modify the links - ie you don't need to go into the formula and change the references etc... the values in B can of course themselves become results of other formulae etc etc...

    Regards your Macro question - new thread please

  13. #13
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Re: Hyperlink to a Value

    How did you make column B collapse?

  14. #14
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Re: Hyperlink to a Value

    Nevermind, I got it! Thanks again for your help!!

+ 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