+ Reply to Thread
Results 1 to 4 of 4

IF+HYPERLINK formula worked. Now that I reference, it doesn't.

  1. #1
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    253

    IF+HYPERLINK formula worked. Now that I reference, it doesn't.

    The following formula works:

    =IF(AND($B5=$B4,$B4=$B3,$N5>=1),HYPERLINK($U$2&$G$1&"\"&$D$2&"\"&$B4&"("&SUM(O$4,$N4,$N3)&")"&".JPG","("&SUM(O$4,$N4,$N3)&")"),IF(AND($B5=$B4,$N5>=1),HYPERLINK($U$2&$G$1&"\"&$D$2&"\"&$B4&"("&SUM(O$4,$N4)&")"&".JPG","("&SUM(O$4,$N4)&")"),IF($N5>=1,HYPERLINK($U$2&$G$1&"\"&$D$2&"\"&$B5&"(1).JPG","(1)"),"")))

    All this formula says is that If I have a 1, 2, 3... 12 in this cell, then create a hyperlink ending in "(?)", where ? is a number depending on what I put in (either a 1, 2, 3... 12).

    What I did now is rather than manually inputting in this 1, 2, 3... 12, I have it reference Sheet1!J2.
    Sheet1!J2 will give me a number between 1-20 or a blank, depending on what the formula gives me.
    The formula on Sheet1!J2 is =IF(K2="","",(MATCH(TRUE,INDEX(K2:X2="",0),0)-1)/2 )

    So I will get my number, and it will create the right hyperlink.... but when the cell is blank, it still creates a hyperlink, although the cell is blank.

    Why?
    Where does my current long formula need to say: If cell is blank, don't create the hyperlink? It didn't do it before, but before i also manually input a number.

  2. #2
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: IF+HYPERLINK formula worked. Now that I reference, it doesn't.

    Hi,

    Use ISBLANK Function to get ur result.

    =ISBLANK(yourformula)
    Regards,
    PRB.

    Right time to become Expert..

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: IF+HYPERLINK formula worked. Now that I reference, it doesn't.

    Try

    =IF(Sheet1!J2="","",IF(AND($B5=$B4,$B4=$B3,$N5>=1),HYPERLINK($U$2&$G$1&"\"&$D$2&"\"&$B4&"("&SUM(O$4,$N4,$N3)&")"&".JPG","("&SUM(O$4,$N4,$N3)&")"),IF(AND($B5=$B4,$N5>=1),HYPERLINK($U$2&$G$1&"\"&$D$2&"\"&$B4&"("&SUM(O$4,$N4)&")"&".JPG","("&SUM(O$4,$N4)&")"),IF($N5>=1,HYPERLINK($U$2&$G$1&"\"&$D$2&"\"&$B5&"(1).JPG","(1)"),""))))


    adapt ranges accordingly
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Contributor
    Join Date
    10-23-2004
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    253

    Re: IF+HYPERLINK formula worked. Now that I reference, it doesn't.

    Ace, you hit me with another Ace again! Thanks

    Punna, I didn't try it only because Ace's formula was ready for copy and paste. I think it would be the same thing though.

+ 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] Formula worked in Excel 2003 but doesn't in 2010.
    By retiredjhawk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-29-2012, 11:39 AM
  2. [SOLVED] hyperlink doesn't work, "Reference is not Valid"
    By Stella2012 in forum Excel General
    Replies: 3
    Last Post: 07-30-2012, 09:52 PM
  3. it worked adapted formula now doesn't please help
    By worthingto in forum Excel General
    Replies: 3
    Last Post: 09-18-2011, 02:07 AM
  4. [SOLVED] Error with macro-it worked now it doesn't
    By Daniel R. Young in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-03-2005, 07:50 PM
  5. Error with macro-it worked now it doesn't
    By Daniel R. Young in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2005, 06:17 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