+ Reply to Thread
Results 1 to 6 of 6

#N/A Workaround

  1. #1
    Registered User
    Join Date
    08-10-2010
    Location
    OOOOklahoma
    MS-Off Ver
    Excel 2007
    Posts
    19

    #N/A Workaround

    I have a Vlookup that is returning the value #N/A. Is there a way to enter a conditional format:
    =If(a1="#N/A",1,0)
    I tried this equation and it did not work.
    Is there anyway to work around this?
    Last edited by mcantrell; 08-16-2010 at 03:53 PM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: #N/A-Work around

    Hi,

    Explore this

    http://www.contextures.com/xlfunctions02.html#Trouble
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

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

    Re: #N/A-Work around

    There is the ISNA() function you can use to check if a cell contains that error

    =IF(ISNA(A1),1,0)

  4. #4
    Registered User
    Join Date
    08-10-2010
    Location
    OOOOklahoma
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: #N/A-Work around

    used an IFERROR statement...thx

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

    Re: #N/A Workaround

    mcantrell, using IfError may not be such a good idea, because IfError does not distinguish between the different kinds of errors. #N/A means that the lookup value can not be found. #Ref! or #Value! or #Div/0 would also be masked by IfError and you may have a hard time debugging if things go wrong.

    cheers

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: #N/A Workaround

    You might also adapt your vlookup as follows

    =if(countif(b1:b100,a1),vlookup(a1,b1:d100,col, false),"")

    where b1:b100 is the first col of your lookup table, a1 the value to lookup, b1:d100 the lookuptable and col the column nr where to look up.

+ 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