+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : VLOOKUP Help

  1. #1
    Registered User
    Join Date
    10-17-2011
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    10

    VLOOKUP Help

    I am attaching a sample file.

    This is the next step in my inventory project.

    I am doing a vlookup to another tab to pull in the inventory on hand for a given part. The vlookup works fine unless there is not actually any inventory on had for that part. If that is the case it returns #N/A. Which then causes a problem with other formulas in the spreadsheet.

    I'm not sure how to incorporate an IF statement which would return 0 if the parts were not found on hand.

    Any help will be greatly appreciated.

    Thanks,
    Brian
    Attached Files Attached Files

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: VLOOKUP Help

    hello
    can't open your links but here's one = returns 0 if not available.

    =IF(ISNA(VLOOKUP(A4,ONHAND,3,FALSE)),"",
    IF(VLOOKUP(A4,ONHAND,3,FALSE)="","",
    VLOOKUP(A4,ONHANDt,3,FALSE)))
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VLOOKUP Help

    You're using Excel 2007, so you can use IFERROR to suppress error results.

    If your first formula were:

    =VLOOKUP(A1, D:E, 2, 0)

    ....then you'd put that in an IFERROR like this:

    =IFERROR(VLOOKUP(A1, D:E, 2, 0), "")


    Now try that with your own VLOOKUP formulas.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: VLOOKUP Help

    Given that you're using 2007 or above, you could just wrap your formula in IFERROR()
    Please Login or Register  to view this content.
    [EDIT]
    Apologies Jerry, never saw your post
    I used IFERROR(..........,0) because of the OPs' custom formatting, it returns "-" for zero.
    Last edited by Marcol; 10-18-2011 at 07:54 PM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Registered User
    Join Date
    10-17-2011
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: VLOOKUP Help

    Thank you! That did it!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VLOOKUP Help

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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