+ Reply to Thread
Results 1 to 6 of 6

Vlookup Error

  1. #1
    Registered User
    Join Date
    06-19-2008
    Posts
    63

    Vlookup Error

    I am trying to embed 2 VLOOKUPs in a function and if the result of both are an Error (#N/A) the value shown is 0.

    I tried a handful of combinations, but Excel keeps telling me there are too many arguments embedded. An example I was trying was

    =IF(ISERROR(VLOOKUP1),IF(ISERROR(VLOOKUP2),0,VLOOKUP2),VLOOKUP1)

    So if Vlookup1 was an error, it then went onto the second IF and checked to see if Vlookup2 was an error. If both were an error, it resulted in 0. If Vlookup2 was good, it showed that result. Looking back at the first IF statement, if the VLOOKUP1 isn't an error, it showed VLOOKUP1.

    Excel don't let me do this, and I am sure there's an easier way to do this. I just need the resulting value if both VLOOKUPS error-out to be 0.

    Thank you!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Vlookup Error

    I bet you get better help on your question if you add an excel file without confidential information on the forum.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    06-19-2008
    Posts
    63

    Re: Vlookup Error

    VLOOKUPERROR.xlsxYou are probably right, I was in a bit of a hurry at first. here is an example.

    In column C I want to enter a formula that will first lookup the value in Column B in the Pricing Data tab, if it results in an error (the pricing isn't listed for the Ship-to/Product combo), it will do the same vlookup but with the value in Column A. If that also results in an error, it should return 0.

    To help, in Column E I've put what the right formula should return.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Vlookup Error

    Try this one

    =IFERROR(VLOOKUP(A3,'Price Data'!$A$2:$B$118,2,0),IFERROR(VLOOKUP(B3,'Price Data'!$A$2:$B$118,2,0),0))
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    06-19-2008
    Posts
    63

    Re: Vlookup Error

    That worked, thank you!

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Vlookup Error

    You're welcome. Don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

+ 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. Iferror vlookup if error vlookup if x=Y,
    By rwmeis in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-21-2013, 08:24 PM
  2. How to error trap a vlookup that returns an error or #N/A
    By kjy1989 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2013, 12:01 PM
  3. [SOLVED] lookup - if(is error(vlookup and error messages meanings
    By grphillips in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-18-2013, 07:03 PM
  4. Replies: 0
    Last Post: 05-14-2012, 11:59 PM
  5. [SOLVED] vlookup error!!
    By Samantha in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-11-2005, 06:06 AM

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