+ Reply to Thread
Results 1 to 8 of 8

Link does not work when returned as a result of VLOOKUP

  1. #1
    Registered User
    Join Date
    08-26-2017
    Location
    Malta
    MS-Off Ver
    365 ProPlus
    Posts
    11

    Link does not work when returned as a result of VLOOKUP

    Hi all,

    I am using formulas HYPERLINK and VLOOKUP as shown in the attached file. However, when the result is actually a link to a place within the document, the link no longer works. Any suggestion as how to fix this are more than welcome

    Thank you very much for taking the time with this!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,162

    Re: Link does not work when returned as a result of VLOOKUP

    The same question has been asked here: https://www.excelforum.com/excel-gen...k-vlookup.html

    You might want to keep your eye on that thread.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Link does not work when returned as a result of VLOOKUP

    Please try
    =HYPERLINK("#"&VLOOKUP(B8,A2:B5,2,FALSE))

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Link does not work when returned as a result of VLOOKUP

    You need to make the formula part of the HL function, something likethis...
    =HYPERLINK("#"&"'"&VLOOKUP(B8,A2:B5,2,FALSE)&"'!A1",VLOOKUP(B8,A2:B5,2,FALSE))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    08-26-2017
    Location
    Malta
    MS-Off Ver
    365 ProPlus
    Posts
    11

    Re: Link does not work when returned as a result of VLOOKUP

    Thank you for your answers!

    The first formula works great when everything is on the same spreadsheet. The link stops working if the formula is moved to another sheet though. Any suggestions as to how to fix that?

    Thank you again for your time.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Link does not work when returned as a result of VLOOKUP

    If the formula is on a different sheet, adjust the vlookup accordingly

    Otherwise show/explain what you mean?

  7. #7
    Registered User
    Join Date
    08-26-2017
    Location
    Malta
    MS-Off Ver
    365 ProPlus
    Posts
    11

    Re: Link does not work when returned as a result of VLOOKUP

    I was wrong to believe that the error was caused because of the formula being in a separate spreadsheet. I noticed that the formula works fine in the sample file that I uploaded in this thread until the moment that I format the cells that contain the values as a table. Then the link appears, but when clicked it produces two messages.

    The first being "Microsoft Office has identified a potential security concern. Hyperlinks can be harmful.... Do you want to continue?" to which I click "YES" and then I get the second one which says "Cannot open the specified file".

    The link is to a different spreadsheet in the same workbook.

    Any suggestions?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Link does not work when returned as a result of VLOOKUP

    If the attached WB contains your table, fine, otherwise update the file please?

+ 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. [SOLVED] WorksheetFunction.VLookup doesnt work if result is #N/A
    By HerryMarkowitz in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 03-11-2015, 10:40 AM
  2. [SOLVED] If Statement Help Please. Work result being returned
    By Mechjo16 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-15-2013, 07:46 PM
  3. No error but no result returned while performing a VBA Sorting Code
    By seigna in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2013, 02:56 AM
  4. [SOLVED] De bug Error caused by Autofill when 1 result returned
    By PFDave in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2012, 07:33 AM
  5. [SOLVED] Excel, function, result to be returned in another designated cell
    By EXCEL WORKSHEET FUNCTIONS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-21-2006, 01:30 PM
  6. Wrong result returned by UsedRange.Rows.Count
    By j in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2005, 04:05 PM
  7. [SOLVED] Result not being returned
    By Pat in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-19-2005, 02:06 PM

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