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|
Please enter this formula into a blank cell you need:
And then press Enter key, you will get a blank cell instead of the 0, see screenshot:
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)).
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:
And then, press Enter key to get the result you need, see screenshot:
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").
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.
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:
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?