Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to vlookup to return blank or specific value instead of 0 or N/A in Excel?

Normally, when you apply the vlookup function to return the corresponding value, if your matching cell is blank, it will return 0, and if your matching value is not found, you will get an error #N/A value as below screenshot shown. Instead of displaying the 0 or #N/A value, how can you make it show blank cell or other specific text value?

The matching cell is blank: 0 is displayed The matching value is not found: N/A value is displayed

Vlookup to return blank or specific value instead of 0 with formulas

Vlookup to return blank or specific value instead of N/A with formulas

Vlookup to return blank or specific value instead of 0 or N/A with a powerful feature


Vlookup to return blank or specific value instead of 0 or N/A error value in Excel

Kutools for Excel's Replace 0 or #N/A with Blank or a Specific Value utility helps you to return and display the blank cell or specific value if the vlookup result is 0 or #N/A value. Click to download Kutools for Excel!

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!


Vlookup to return blank or specific value instead of 0 with formulas

Please enter this formula into a blank cell you need:

=IF(LEN(VLOOKUP(D2,A2:B10,2,0))=0,"",VLOOKUP(D2,A2:B10,2,0))

And then press Enter key, you will get a blank cell instead of the 0, see screenshot:

Notes:

1. In the above formula, D2 is the criterion which you want to return its relative value, A2:B10 is the data range you use, the number 2 indicates which column that the matched value is returned.

2. If you want to return a specific text instead of the 0 value, you can apply this formula: =IF(LEN(VLOOKUP(D2,A2:B10,2,0))=0,"Specific text",VLOOKUP(D2,A2:B10,2,0)).


Vlookup to return blank or specific value instead of N/A with formulas

To replace the #N/A error with blank cell or other custom value if your searched value is not found, you can use the below formula:

=IFERROR(VLOOKUP(D2,A2:B10,2,FALSE),"")

And then, press Enter key to get the result you need, see screenshot:

Notes:

1. In this formula, D2 is the criterion which you want to return its relative value, A2:B10 s the data range you use, the number 2 indicates which column that the matched value is returned.

2. If you want to return a specific text instead of the #N/A value, you can apply this formula: =IFERROR(VLOOKUP(D2,A2:B10,2,FALSE),"Specific text").


Vlookup to return blank or specific value instead of 0 or N/A with a powerful feature

If you have Kutools for Excel, with its Replace 0 or #N/A with Blank or a Specific Value feature, you can solve this task quickly and easily.

Tips:To apply this Replace 0 or #N/A with Blank or a Specific Value feature, firstly, you should download the Kutools for Excel, and then apply the feature quickly and easily.

After installing Kutools for Excel, please do as this:

1. Click Kutools > Super Lookup > Replace 0 or #N/A with Blank or a Specific Value, see screenshot:

2. In the Replace 0 or #N/A with Blank or a Specific Value dialog box:

  • (1.) Specify the lookup value and output range as you need;
  • (2.) Choose the returned result as you need, you can select Replace 0 or #N/A value with empty option or Replace 0 or #N/A value with a specified option;
  • (3.) Select the data range and the corresponding key and returned column.

3. Then, click OK button, the certain value you are specified in step 2 has been displayed instead of the 0 or # N/A error value, see screenshot:

Click to Download Kutools for Excel and free trial Now!


More relative articles:

  • Vlookup Values Across Multiple Worksheets
  • In excel, we can easily apply the vlookup function to return the matching values in a single table of a worksheet. But, have you ever considered that how to vlookup value across multiple worksheet? Supposing I have the following three worksheets with range of data, and now, I want to get part of the corresponding values based on the criteria from these three worksheets.
  • Vlookup And Return Matching Data Between Two Values
  • In Excel, we can apply the normal Vlookup function to get the corresponding value based on a given data. But, sometimes, we want to vlookup and return the matching value between two values, how could you deal with this task in Excel?
  • Vlookup And Return Multiple Values From Drop Down List
  • In Excel, how could you vlookup and return multiple corresponding values from a drop down list, which means when you choose one item from the drop down list, all of its relative values are displayed at once as following screenshot shown. This article, I will introduce the solution step by step.
  • Vlookup Values Across Multiple Worksheets To Return Sheet Names
  • Supposing, I have multiple worksheets and each sheet contains a list of names, now, I want to vlookup the names in a master sheet and return the matching sheet names where the names are located as following screenshot shown. How could you solve this task in Excel?
  • Vlookup And Return Multiple Values Without Duplicates
  • Sometimes, you may want to vlookup and return multiple matched values into a single cell at once. But, if there are some repeated values populated into the returned cells, how could you ignore the duplicates and only keep the unique values when returning all matching values as following screenshot shown in Excel?

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Alan Crookes · 7 months ago
    I think this is a good solution but is there a way around the problem that if I use it and then COUNTA() on the cells where the formula is created it counts those cells with "".
  • To post as a guest, your comment is unpublished.
    Jacqueline Price · 1 years ago
    I am not a tech guru - I just want to add to my formula that if it does not find anything in the cell - it gives an accounting 0 that will be acknowledged in my total formula. =VLOOKUP(F4,Sponsorships1,2,FALSE)
  • To post as a guest, your comment is unpublished.
    Besty · 1 years ago
    for blank values the LEN function is converting true zero's from the lookup data to blank. Any ideas on how to bring true zeros across and only convert the blanks to blank?
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      Hi, Besty,
      The above Len function just convert blanks to blank, and it keeps the real 0 when applying it. please try it again.
      Or you can insert an attachment here to describe your problem.
      Thank you!
  • To post as a guest, your comment is unpublished.
    Karma · 1 years ago
    Thank you, it worked!
  • To post as a guest, your comment is unpublished.
    Laura · 2 years ago
    Thanks sky yang - This is awesome!

    I applied the formula you provided and I changed the cell references but now I'm getting #N/A instead of 0 or a negative symbol.
  • To post as a guest, your comment is unpublished.
    laura · 2 years ago
    This is my formula. I can't get results to report a "-" instead of a zero. I don't want a zero I'd like accounting format for a zero. Please help.
    =IF(ISNA(VLOOKUP($A13,'All Exp Posted'!$A$1:$B$100,2,FALSE)),"0",VLOOKUP($A13,'All Exp Posted'!$A$1:$B$100,2,FALSE))
    • To post as a guest, your comment is unpublished.
      Monciar · 1 years ago
      all you need to do is set the cell setting to accounting and remove the " in the last part.

      =IF(ISNA(VLOOKUP($A13,'All Exp Posted'!$A$1:$B$100,2,FALSE),0)

      as you can see there is no quotation mark next to the zero, because adding the quotation marks sets the value as text.
    • To post as a guest, your comment is unpublished.
      skyyang · 2 years ago
      Hi, laura,

      If you want to get the result "- " instead of a zero, please apply the following formula:
      =IF(LEN(VLOOKUP(E1,A2:B10,2,0))=0,"-",VLOOKUP(E1,A2:B10,2,0)).

      Please change the cell references to your need.
      Please try it, hode it can help you!

      Thank you!
  • To post as a guest, your comment is unpublished.
    Chris · 2 years ago
    ddub, That is an awesome formula. Thanks for the help!
  • To post as a guest, your comment is unpublished.
    ddub · 2 years ago
    Here's a way to combine the 2 so that the output is ether the name or a comment stating the "ID does not exist"

    =IF(ISERROR(VLOOKUP(E1,A2:B10,2,FALSE)),"ID does not exist",IF(LEN(VLOOKUP(E1,A2:B10,2,0))=0,"",VLOOKUP(E1,A2:B10,2,0)))

    The returned output will equal "ID does not exist" for a value that is not found. You can change this comment to whatever you want by replacing the text string = "ID does not exist" (make sure to keep the quotes). To have no comment, change it to read:

    =IF(ISERROR(VLOOKUP(E1,A2:B10,2,FALSE)),"",IF(LEN(VLOOKUP(E1,A2:B10,2,0))=0,"",VLOOKUP(E1,A2:B10,2,0)))
  • To post as a guest, your comment is unpublished.
    Scott · 2 years ago
    You could resolve N/A to 0 and then only test for 0 as follows



    =IF(IFNA(VLOOKUP(A2,Table3,7,FALSE),0)=0,"",VLOOKUP(A2,Table3,7,FALSE))
    • To post as a guest, your comment is unpublished.
      Michele · 2 years ago
      Finally I found it......this is what I was looking for thanks so much
  • To post as a guest, your comment is unpublished.
    May · 2 years ago
    How do you create just one formula to remove #NA and a default date to 1900 on the same cell?
    1/0/1900 0:00


    thanks
    • To post as a guest, your comment is unpublished.
      Alex · 2 years ago
      something like =IFERROR(VLOOKUP(A2,Table3,7), 1900) should work
  • To post as a guest, your comment is unpublished.
    Paul · 2 years ago
    Thank you for this has helped clean up my reports so they no longer have a number of #N/A's on them.
  • To post as a guest, your comment is unpublished.
    Vanessa · 3 years ago
    How do I combine those? I have a situation where some of the lookup values are blank, so VLOOKUP returns #N/A, or the lookup value if valid, but the target int he array is blank so it returns 0. I can solve either of these problems individually, but I can't seem to solve both at the same time.
    • To post as a guest, your comment is unpublished.
      Jon · 2 years ago
      Also looking to see if you've solved this problem!
    • To post as a guest, your comment is unpublished.
      johnny · 2 years ago
      Did you find out how to solve this?
  • To post as a guest, your comment is unpublished.
    Marilyn · 3 years ago
    Sorry - the solution to replace the 0 return does not work!
  • To post as a guest, your comment is unpublished.
    MOHAMED · 4 years ago
    thank you so much, i have a solution from here