Skip to main content

How to VLOOKUP and return zero instead of #N/A in Excel?

Author: Sun Last Modified: 2024-07-19
vlookup return 0
When using VLOOKUP in Excel, encountering the #N/A error can be frustrating, especially when dealing with large datasets. This error indicates that the lookup value isn't found in the specified range. However, in many cases, you might prefer to display a zero instead of the #N/A error for better readability. This guide will show you how to use VLOOKUP and return zero instead of #N/A, ensuring your spreadsheets remain clean and user-friendly.
Return zero instead of #N/A with a formula
Return zero or other specific text instead of #N/A with Kutools for Excel good idea3

arrow blue right bubble Return zero instead of #N/A with a formula

To return zero instead of #N/A when the VLOOKUP function cannot find the correct relative result, you just need to change the ordinary formula to another one in Excel.

Select the cell you want to use VLOOKUP function, and type this formula =IFERROR(VLOOKUP(A13,$A$2:$C$10,3,0),0), drag the autofill handle to the range you need. See screenshot:
doc-vlookup-return-0-2

Tips:
(1) In the above formula, A13 is the lookup value, A2:C10 is the table array range, and 3 is the index column number. The last 0 is the value you want to show when the VLOOKUP cannot find the relative value.
(2) This method will replace all kinds of errors with the number 0, including #DIV/0, #REF!, #N/A, etc.


arrow blue right bubble Return zero or other specific text instead of #N/A with Kutools for Excel

With Kutools for Excels Super LOOKUP utilities group, you can lookup values from right to left (or left to right), lookup value across multiple worksheets, lookup values from bottom to top ( or top to bottom), and lookup value and sum, and lookup between two value, all of them support to replace #N/A error value with other text. 

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Enhanced with AI capabilities, Kutools automates tasks with precision, making data management effortless. Read More...         Free trial...

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Click Kutools > Super LOOKUP > Replace 0 or #N/A with blank or Specified Value.

2. In the Replace 0 or #N/A with blank or Specified Value dialog, do as below step:

  • (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 error value with a blank option or Replace 0 or #N/A error value with a specified value option;
  • (3.) Select the data range and the corresponding key and returned column.
  • (4.) Then, click OK button.
    vlookup return 0 kutools

3. The values have been returned based on the lookup value, and the #N/A errors are also replaced by zero or the new text.
vlookup return 0 kutools result


Relative Articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


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!
Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This helped me a lot. Thank you!
This comment was minimized by the moderator on the site
very useful info. was struggling with getting the zero. thanks guys. you are my Batmen.
This comment was minimized by the moderator on the site
Thank you very much
This comment was minimized by the moderator on the site
Thank you....
This comment was minimized by the moderator on the site
how do you write this is VBA code though?

=IFERROR(VLOOKUP(A13,$A$2:$C$10,3,0)


If (shtdest.Range("E" & ii)) = "N/A" Then
replace with "0"



is not working
This comment was minimized by the moderator on the site
=IFERROR(VLOOKUP(A13,$A$2:$C$10,3,false),0)
This comment was minimized by the moderator on the site
Sorry I do not know how to rewrite your code, why do not use above easy methods to solve?
This comment was minimized by the moderator on the site
the easy methods above are not free. so learn the codes.
There are no comments posted here yet
Load More
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations