+ Reply to Thread
Results 1 to 6 of 6

Getting Rid of Vlookup #N/A Error Message

  1. #1
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Getting Rid of Vlookup #N/A Error Message

    Greetings Evreryone,

    How can you write a VLOOKUP formula to prevent it from giving you an #N/A error message when it is unable to find the lookup value.

    For example: If i am looking for let say number 101 in column 'A" but there is no number one, how do i get the vlookup formula to return Zero (0) instead of #N/A.
    Last edited by headley4ever; 12-07-2010 at 07:25 PM.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Getting Rid of Vlookup #N/A Error Message

    Test for the existence of the value before you use VLOOKUP.

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Getting Rid of Vlookup #N/A Error Message

    Or:

    =IF(ISNA(your formula),0,your formula)

  4. #4
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Getting Rid of Vlookup #N/A Error Message

    The formula i am using is =Vlookup(101,A1:C200,3,0) NB: 101 is the Item number for a Product we sell and this is in column "A" along with 200 other item numbers for other products we sell. This formula gives us the amount sold for the respective Products based on their lookup value which is the item numbers. The problem i am having is that if an item is not sold the item number for that product would not appear on the spreadsheet so i will get #N/A in the cells for any item that is not sold. I Need know how i can get VLOOKUP to return Zero (0) in the cells of these items that is not sold instead of #N/A

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Getting Rid of Vlookup #N/A Error Message

    By using what has been given.

    =IF(ISNA(Vlookup(101,A1:C200,3,0)),0,Vlookup(101,A1:C200,3,0))

    If you prefer the other method that was suggested adapt it thusly:

    =IF(COUNTIF(A1:A200,A1)>0,VLOOKUP(A1,A1:C200,3,0),0)
    or
    =IF(COUNTIF(A1:A200,A1)=0,"",VLOOKUP(A1,A1:C200,3,0))
    NOTE: A1 here would be the cell holding your 101 value
    Last edited by Cutter; 12-07-2010 at 07:31 PM.

  6. #6
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Getting Rid of Vlookup #N/A Error Message

    Thanks ........ This definetly works.

+ 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