+ Reply to Thread
Results 1 to 11 of 11

Vlookup inside IF function not working

  1. #1
    Registered User
    Join Date
    02-20-2013
    Location
    Doncaster, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Question Vlookup inside IF function not working

    I have the following formula that has ceased to work in excel. I don't think there are any errors in it so I'm unsure as to why the link no longer works. Neither of the files I'm using has moved location on the server.

    =IF(H7>0,(I7*H7)+((I7*H7/100)*VLOOKUP(B7,'T:\FILE\FILE\FILE'!$B:$E,4,FALSE))+0.25,0)

    I'm not sure if this makes much of a difference but people opening the file use various versions of Microsoft Office.

    Thanks,

    Ruby
    Last edited by Ruby91; 01-07-2014 at 09:44 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Vlookup inside IF function not working

    Hi, in Excel 2007 'T:\FILE\FILE\FILE' is not a valid sheet name...



    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vlookup inside IF function not working

    Is 'T:\FILE\FILE\FILE' the sheet name? Normally the reference would look like:
    '[T:\FOLDER\FOLDER\FILE.xls]Sheetname'!$B:$E

  4. #4
    Registered User
    Join Date
    02-20-2013
    Location
    Doncaster, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Vlookup inside IF function not working

    Here's What it looks like when both files are open at the same time (below) sorry I didn't realise I'd taken out the [] in my paste.

    =IF(H9>0,(I9*H9)+((I9*H9/100)*(VLOOKUP(B9,'[FILE.xlsx]FILE'!$B:$E,4,FALSE)))+0.25,0)

    This is what it looks like when the lookup file is closed.

    =IF(H9>0,(I9*H9)+((I9*H9/100)*(VLOOKUP(B9,'T:\FOLDER\FOLDER\[FILE.xlsx]FILE'!$B:$E,4,FALSE)))+0.25,0)
    Last edited by Ruby91; 01-07-2014 at 10:09 AM.

  5. #5
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vlookup inside IF function not working

    If you replace file with your actual folder and file name, it is still not a valid reference.

    For example, if I wanted to look at the file "test.xls" in the folder "myfolder" and the sheet "mysheet" I would do:
    '[T:\myfolder\test.xls]mysheet'!$B:$E
    not
    'T:\myfolder\test.xls'$B$E

    i.e. you don't have a valid sheet reference

  6. #6
    Registered User
    Join Date
    02-20-2013
    Location
    Doncaster, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Vlookup inside IF function not working

    Sorry yudlugar please see my edited post;

    Here's What it looks like when both files are open at the same time (below) sorry I didn't realise I'd taken out the [] in my paste.

    =IF(H9>0,(I9*H9)+((I9*H9/100)*(VLOOKUP(B9,'[FILE.xlsx]FILE'!$B:$E,4,FALSE)))+0.25,0)

    This is what it looks like when the lookup file is closed.

    =IF(H9>0,(I9*H9)+((I9*H9/100)*(VLOOKUP(B9,'T:\FOLDER\FOLDER\[FILE.xlsx]FILE'!$B:$E,4,FALSE)))+0.25,0)

  7. #7
    Registered User
    Join Date
    02-20-2013
    Location
    Doncaster, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Vlookup inside IF function not working

    I've checked the VLOOKUP on it's own and it works fine just not combined with the IF function.

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vlookup inside IF function not working

    What does the vlookup return and what is I9 and H9?

  9. #9
    Registered User
    Join Date
    02-20-2013
    Location
    Doncaster, England
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Vlookup inside IF function not working

    I9 is a weight, H9 is a quantity and the lookup is to add a yield% to the original quantity.

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup inside IF function not working

    Can you describe "no longer works" ??

    What exactly happens?
    Does it result in an error message?
    Do you get the wrong result?
    What result did it actually return, and in what way is that different from the result you were expecting?

    I'd suggest using the Formula Evaluation tool to watch each step as the formula is calculated.

  11. #11
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vlookup inside IF function not working

    What is the actual values? Not what they represent...

    Perhaps you could upload example workbooks, it would make things a lot easier!

+ 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. Help with file path inside VLOOKUP function
    By acpt22 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-25-2013, 05:51 AM
  2. Replies: 1
    Last Post: 10-02-2012, 04:27 PM
  3. VLOOKUP Function not working
    By exposure31 in forum Excel General
    Replies: 2
    Last Post: 08-28-2012, 04:32 PM
  4. Vlookup function not working
    By rahulkrishnanr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-07-2012, 06:53 AM
  5. Excel 2007 : VLookup Function Not Working
    By LAB2007 in forum Excel General
    Replies: 4
    Last Post: 06-30-2010, 03:23 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