+ Reply to Thread
Results 1 to 4 of 4

Vlookup returning Error

  1. #1
    Registered User
    Join Date
    10-18-2010
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    2

    Vlookup returning Error

    Hi All,

    I wonder if anyone can help me, I have the following formula
    =IF(O3="","",VLOOKUP(O3,Sheet3!E:F,2,FALSE))

    I Need to add in the iserror to prevent returning an error but cant get it to work however I try it.

    Any help would be greatly received

    Many Thanks
    Steve
    Last edited by stevewood313; 10-18-2010 at 06:23 AM. Reason: Non-Compliant Title

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Vlookup returning Error

    The formula looks fine. If O3 is empty, it will return a blank string. If it is not empty, the Vlookup will be performed.

    What error do you get? If it's #N/A, then the value of O3 is not found in your lookup table.

    Check for leading/trailing spaces. Check for numbers stored as text.

    If that does not help, please upload a file with some sample data that mirrors your data layout and shows the same problem.

  3. #3
    Registered User
    Join Date
    10-18-2010
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Vlookup returning Error

    Hi Teylyn,

    Many thanks for quick response, I do get the #n/a error, I believe this is because the data may not be in my vlookup list, I was wondering if it is possible to get this formula to return a "0" instead of #n/a.

    Many Thanks

    Steve

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Vlookup returning Error

    returning a 0 instead of #N/A is possible, but not advisable. N/A is an error that shows you that your lookup value is not found in the lookup table, and you may want to capture that.

    If you insist on exchanging N/A for 0, then you can use

    =IF(O3="","",if(isna(match(O3,Sheet3!E:F,0)),0,VLOOKUP(O3,Sheet3!E:F,2,FALSE)))

+ 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