+ Reply to Thread
Results 1 to 9 of 9

Converting #N/A to other values

Hybrid View

  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    3

    Converting #N/A to other values

    Hi,

    I am an xls user for many years but never had the need to use formula. Today, my job requires me to do some mapping and files comparison. After I have performed VLOOKUP, I got the result as #N/A. Now, I want to know how to convert #N/A to "Blank".
    Please share with me.

    Thank you

    Ming Ha

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

    Re: Converting #N/A to other values

    Hi Ming Ha,

    The #N/A is usually avoided with an IF formula to check whether the value you need is in the list before you let VLOOKUP do it's work. COUNTIF is useful for this as well. For example:

    =IF(COUNTIF(A1:A100,G2),VLOOKUP(G2,A1:C100,3,0),"")
    This formula counts the number of times the value of G2 is in column A. If it isn't there, the formula returns "", or nothing. Otherwise it's business as usual for the VLOOKUP with the assurance the value will be found.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    05-10-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Converting #N/A to other values

    Quote Originally Posted by ConneXionLost View Post
    Hi Ming Ha,

    The #N/A is usually avoided with an IF formula to check whether the value you need is in the list before you let VLOOKUP do it's work. COUNTIF is useful for this as well. For example:

    =IF(COUNTIF(A1:A100,G2),VLOOKUP(G2,A1:C100,3,0),"")
    This formula counts the number of times the value of G2 is in column A. If it isn't there, the formula returns "", or nothing. Otherwise it's business as usual for the VLOOKUP with the assurance the value will be found.
    Hi,

    Thanks for the prompt response. My formula is this: =VLOOKUP(A:A,'ABC'!A:C,3,FALSE). The result I got is #N/A. Now I want the result to show 'Blank. Can you please show me the formula.

  4. #4
    Forum Contributor
    Join Date
    05-07-2013
    Location
    apple valley ca
    MS-Off Ver
    Excel 2007
    Posts
    110

    Re: Converting #N/A to other values

    just put the IFERROR in front of the vlookup and at the end put a , the "" with a )

    something like this =IFERROR(VLOOKUP($E2,'Pull From '!$A$2:$C$13,COLUMNS($A$2:A2)+1,0),"")

  5. #5
    Registered User
    Join Date
    05-10-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Converting #N/A to other values

    Thank you xwarlock10x, your answer works. How about this one" =VLOOKUP(A:A,'Model Office'!A:B,2,FALSE)" ? The value is matched and returned a "0" (zero value). How do I convert it to 'Blank'?

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

    Re: Converting #N/A to other values

    xwarlock10x,

    Ming Ha's profile suggests Excel 2003; IFERROR won't work.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Converting #N/A to other values

    xwarlock the OP's profile suggests they have 2003, iferror() only became available in 2007. So they would need to use...

    =IF(iserror(VLOOKUP($E2,'Pull From '!$A$2:$C$13,COLUMNS($A$2:A2)+1,0),"",VLOOKUP($E2,'Pull From '!$A$2:$C$13,COLUMNS($A$2:A2)+1,0))

    formula modified...
    =if(iserror(=VLOOKUP(A:A,'ABC'!A:C,3,FALSE),"Blank",=VLOOKUP(A:A,'ABC'!A:C,3,FALSE))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

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

    Re: Converting #N/A to other values

    Yes, ISERROR can be used; however, I suggest COUNTIF because it is more efficient than ISERROR(VLOOKUP.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Converting #N/A to other values

    Ming Ha, what version of excel are you using? If is it not 2003, I suggest you update your profile

    Also, take a look at post #6

+ 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