+ Reply to Thread
Results 1 to 13 of 13

Links in vlookup

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    49

    Links in vlookup

    I've attached a sample document that I need help with.

    On sheet 1, I have the 6 rows with data validation lists.

    On sheet 2, I have the list along with hyperlinks.

    On sheet 1, I would like to be able to select any one of the numbers in the list and for it to populate with the correlating hyperlink.

    I've attempted to do this using vlookup but for some reason I am getting #N/A AND my hyperlink is missing.

    Any help is very much appreciated.

    Book1.xlsx

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Links in vlookup

    Try this.......

    Please Login or Register  to view this content.
    and then copy down.

    Hope that helps.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Links in vlookup

    Thank you; however, this only fixes the N/A issues.

    Is there a way to get the hyperlink from sheet 2 to display in column B on sheet 1?

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Links in vlookup

    Try this.....

    Please Login or Register  to view this content.
    Is this what you want?

  5. #5
    Registered User
    Join Date
    10-10-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Links in vlookup

    Not exactly.

    Link 1 on sheet 2 results in google.com

    Link 2 on sheet 2 results in yahoo.com

    So on and so forth...

    Using the above expression does not result in this behavior. In fact, it results in "cannot open the specified file"

    I need the hyperlinks on sheet 2 to fully reflect, in look and behavior, on sheet 1 through the vlookup.

  6. #6
    Registered User
    Join Date
    11-26-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    67

    Re: Links in vlookup

    Hi

    Is it ok to add a helper column on sheet2?
    If so I might have a UDF-solution.
    Please Login or Register  to view this content.
    C1 on sheet2 = FindHyperlink(B1)

    And then just use vlookup on sheet1 to find the value in column C.
    Best regards

    Per Erik Midtr?d

  7. #7
    Registered User
    Join Date
    10-10-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Links in vlookup

    Thank you.

    Not familiar with UDF. Can you help in guiding me how to implement this solution?

  8. #8
    Registered User
    Join Date
    11-26-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    67

    Re: Links in vlookup

    Hi

    Press Alt+F11.
    Insert Module.
    Paste everything in the grey area.

    Now you should have the function FindHyperlink in the category User Defined when you press the insert function symbol (fx)

  9. #9
    Registered User
    Join Date
    10-10-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Links in vlookup

    I pressed alt+f11, double clicked sheet 2 (because I can't paste anything into the grey area), pasted the code and closed the VBA.

    I then pasted the following into cell C1 on sheet 2 =FindHyperlink(B1)

    I get a #NAME? error.

  10. #10
    Registered User
    Join Date
    11-26-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    67

    Re: Links in vlookup

    After Alt+F11 you have to choose Insert and then Module.
    Insert Module.jpg

  11. #11
    Registered User
    Join Date
    10-10-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Links in vlookup

    Got it to work.

    Hmmm, my problem here is that I need it to still say "link 1", not google.com.

    Any other ideas?

  12. #12
    Registered User
    Join Date
    11-26-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    67

    Re: Links in vlookup

    Well, I suppose you could wrap the Hyperlink-function around the vlookup, like this:
    =HYPERLINK(VLOOKUP(A2,Sheet2!A:C,3,FALSE),VLOOKUP(A2,Sheet2!A:C,2,FALSE))

  13. #13
    Registered User
    Join Date
    10-10-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Links in vlookup

    Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel 2007 : VLOOKUP losing path to one of 2 external links
    By greatday2882 in forum Excel General
    Replies: 7
    Last Post: 03-22-2012, 02:55 PM
  2. Links (vlookup) do not auto-update
    By marcazo in forum Excel General
    Replies: 2
    Last Post: 09-06-2011, 11:54 AM
  3. Vlookup to find a hyperlink that links within the same Doc
    By murphybrendan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2011, 02:49 PM
  4. vlookup and relative links
    By adriaanvw in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-29-2007, 06:27 PM
  5. How do I do a vlookup that links to file paths within a cell ref
    By Foozy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-13-2006, 06:35 AM

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