+ Reply to Thread
Results 1 to 18 of 18

VLookup Formula Error

Hybrid View

  1. #1
    Registered User
    Join Date
    02-12-2009
    Location
    Oregon, US
    MS-Off Ver
    Excel 2007
    Posts
    11

    VLookup Formula Error

    I have a file with multiple worksheets and I need to do vlookup of UPCs from 1 worksheet called 0723 and if it is null value then vlookup from another worksheet called productmaster. The formula I came up with is

    =IFERROR(VLOOKUP(UPCLookup!A2,'0723'!$B$2:$Y$63014,23,FALSE),IFERROR(VLOOKUP(UPCLookup!ProductMaster!B2:S149824,18,false),””)))

    This returns an unspecified error and higlights the B2 after productmaster!
    What is wrong with my formula?

    Please help I am pulling my hair out.
    Last edited by i.beard; 02-12-2009 at 04:40 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VLookup Formula Error

    There's some big ranges there... but perhaps:

    =IFERROR(VLOOKUP(UPCLookup!A2,'0723'!$B$2:$Y$63014,23,FALSE),IFERROR(VLOOKUP(ProductMaster!B2:S149824,18,false),””))

  3. #3
    Registered User
    Join Date
    02-12-2009
    Location
    Oregon, US
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VLookup Formula Error

    That gives me a #Name? as a result. This is the same problem I have been running into. Yes the ranges are huge. Somehow 6 weeks of work got overwritten (programmer issue) so I am trying to consolidate old work with new work so that I do not have to spend another 6 weeks working on it.

    I cannot figure out why I am getting that result. If you have any more suggestions I would be eternally grateful.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VLookup Formula Error

    What does

    =IFERROR(1/0,"a")

    return ?

    You definitely running 2007 ?

  5. #5
    Registered User
    Join Date
    02-12-2009
    Location
    Oregon, US
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VLookup Formula Error

    =IFERROR(1/0,"a")
    Returns A

    I tried a different route shown below and got a circular error.

    =IFERROR(VLOOKUP(A2,UPCLOOKUP,FALSE),IFERROR(VLOOKUP(B2:Y63014,23,FALSE),IFERROR(VLOOKUP(ProductMaster!B2:S149824,18,FALSE),””)))

  6. #6
    Registered User
    Join Date
    02-12-2009
    Location
    Oregon, US
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VLookup Formula Error

    Definately running 2007

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VLookup Formula Error

    My last one returns NAME because no lookup criteria is set for the 2nd VLOOKUP... I based mine off your original but didn't check it, apologies... your first one you see I think has a cell reference missing, see:

    VLOOKUP(UPCLookup!ProductMaster!B2:S149824,18,false)
    I took out the UPCLookup! as I thought this was an error and didn't think to check you had a lookup criteria, so in hindsight I suspect it should be:

    VLOOKUP(UPCLookup!XY,ProductMaster!B2:S149824,18,false)
    The above could be wrong in terms of the lookup criteria but that is the source of your problem.

  8. #8
    Registered User
    Join Date
    02-12-2009
    Location
    Oregon, US
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VLookup Formula Error

    Corrected to the following

    =IFERROR(VLOOKUP(UPCLookup!A2,'0723'!$B$2:$Y$63014,23,FALSE),IFERROR(VLOOKUP(UPCLookup!A2,’ProductMaster’!B2:S149824,18, FALSE),””))

    Now it opens an update values dialog box and wants me to select a file to update from...?

  9. #9
    Registered User
    Join Date
    02-12-2009
    Location
    Oregon, US
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VLookup Formula Error

    Okay now corrected to:

    =IFERROR(VLOOKUP(UPCLookup!A2,'0723'!$B$2:$Y$63014,23,FALSE),IFERROR(VLOOKUP(UPCLookup!A2,ProductMaster!B2:S149824,18,FALSE),””))

    and it is returning 0

    Which is odd because if it is null in both which this one happens to be shouldn't it return " " ?

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VLookup Formula Error

    Check the spelling of your sheet names... the dialog is appearing because the formula can not find the references within the current workbook.

    EDIT: no longer relevant.

  11. #11
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VLookup Formula Error

    A Null is not an error value... if the VLOOKUP returns a Null or 0 that will not invoke the IFERROR... only an actual Error will do that -- the most common in relation to a VLOOKUP would be #N/A

  12. #12
    Registered User
    Join Date
    02-12-2009
    Location
    Oregon, US
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VLookup Formula Error

    Sorry I think I worded that wrong, if the cell is blank shouldn't it based on my formula return a " " ?

  13. #13
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VLookup Formula Error

    No, as I say IFERROR is an IF ERROR ... a blank/null is not an error... an error is an #N/A; #VALUE!; #DIV/0! etc...

    Using your example the IFERROR will only invoke if either of the following holds true:

    a) the look up value can't be found in the lookup range --> ie generates an #N/A

    b) the resulting value from the lookup (ie from the column being returned) is an actual Error ... ie the cell found contains #VALUE! etc...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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