+ Reply to Thread
Results 1 to 7 of 7

Help with using IF to Search for text and create hyperlink.

  1. #1
    Registered User
    Join Date
    03-24-2014
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    8

    Help with using IF to Search for text and create hyperlink.

    Hello,

    I am struggling - I basically need a formula in one tab of a spreadsheet that if another cell contains text it will search for that text in another tab and display a useable hyperlink to it.

    So I want a formula in A1 in Sheet1 that will search for the text contained in A2 in Sheet2 and display a useable hyperlink to the cell in which that text is contained, in Sheet2.

    This may not even be possible, but if it is then that would save me SO much time.

    Thanks in advance for your help guys.

    Daniel B

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,435

    Re: Help with using IF to Search for text and create hyperlink.

    Maybe
    =IF(ISNUMBER(SEARCH("YourText",Sheet2!A2)),HYPERLINK(Sheet2!A2,"Click"),"")
    Returns hyperlink name "Click" if sheet2!A2 contents, i.e, "YourTextHere",...
    returns blank if not.
    Quang PT

  3. #3
    Registered User
    Join Date
    03-24-2014
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    8

    Re: Help with using IF to Search for text and create hyperlink.

    Hi. Thanks for the reply.

    That was initially what I was attempting to use - I think this is an instance where grammar is very important! Misunderstanding I think:

    What I meant is if cell A2 in Sheet1 contains "YourTextHere" I want the formulae in A1 in Sheet1 to search ALL of Sheet2 for the text, and if it finds the text give me a hyperlink to the cell in which that text is contained IN Sheet2. Do you see what I mean?

    Thanks for the help though, I can see where my post needed clarity!

    Daniel

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,435

    Re: Help with using IF to Search for text and create hyperlink.

    What happened if searching ALL CELLS of Sheet2? Does it have limitation range in sheet 2, i.e, A1:AA100?

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

    Re: Help with using IF to Search for text and create hyperlink.

    =HYPERLINK("#sheet2!"&ADDRESS(SUMPRODUCT((Sheet2!A1:Z1000=B1)*ROW(Sheet2!A1:Z1000)),SUMPRODUCT((Sheet2!A1:Z1000=B1)*COLUMN(Sheet2!A1:Z1000)),4),"clickhere") will hyperlink to the cell where the text entered in b1 is found in sheet 2 range a1:z1000
    "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

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,435

    Re: Help with using IF to Search for text and create hyperlink.

    Assuming your searching range in sheet2 is A1:O20
    cell A2 in Sheet1 contains "YourText"
    This formula set in A1 will return blank if not found, if found, display HYPERLINK, name "Click" and lead cursor to the relevan cell in sheet 2 that contains "YourText"
    A1:
    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Attached Files Attached Files
    Last edited by bebo021999; 04-28-2014 at 12:20 PM.

  7. #7
    Registered User
    Join Date
    03-24-2014
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    8

    Re: Help with using IF to Search for text and create hyperlink.

    That works perfectly! Thank you so much for your help - I can totally see where I went wrong trying to use the formula I did.

    Cheers,

    Daniel

+ 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. VBA: Search text and extract hyperlink in same cell
    By sroysroy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2013, 11:59 AM
  2. VBA: Search text and extract hyperlink in same cell
    By sroysroy in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-24-2013, 08:55 PM
  3. Replies: 3
    Last Post: 11-12-2012, 10:33 AM
  4. Create hyperlink to Firefox search keyword?
    By skateboarder378 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2012, 03:17 PM
  5. Search Path & Create Hyperlink To File
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-01-2009, 06:58 PM

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