VLOOKUP #N/A

RICK_D

New Member
Joined
Mar 21, 2002
Messages
2
I am working with a VLOOKUP formula. How can I subsitute the #N/A into a 0?

I don't want the results to say #N/A if it does not find the value. I want it to show 0.

Any help would be appreciated!!
Thanks in advanced!!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
On 2002-03-22 11:53, RICK_D wrote:
I am working with a VLOOKUP formula. How can I subsitute the #N/A into a 0?

I don't want the results to say #N/A if it does not find the value. I want it to show 0.

Any help would be appreciated!!
Thanks in advanced!!

If your VLOOKUP formula looks like

=VLOOKUP(A1,$E$2:$G$40,2,FALSE)

use:

=IF(COUNTIF($E$2:$E$40,A2),VLOOKUP(A1,$E$2:$G$40,2,0),0)

If your VLOOKUP formula looks like

=VLOOKUP(A1,$E$2:$G$40,2,TRUE)

or

If your VLOOKUP formula looks like

=VLOOKUP(A1,$E$2:$G$40,2)

use:

=IF(ISNUMBER(MATCH(A2,$E$2:$E$40)),=VLOOKUP(A1,$E$2:$G$40,2),0)
 
Upvote 0
What formula are you using?

Aladin made excellent recommendations just a little earlier.

- slightly edited -

=IF(AND(LEN(A2),COUNTIF(XXXX,A2)),VLOOKUP(A2,XXXXY,2,0),0)

In English, if A2 is blank and A2 is not in range named XXXX, 0.

Otherwise lookup A2 in Database XXXXY

Credit to Aladin.
Please read his comments in Thread(s) on
Vlookup.





Aladin
 
Upvote 0
Or if you dont want to supress your '0's on your worksheet, maby something like this. =IF(COUNTIF($E$2:$E$40,A2),VLOOKUP(A2,$E$2:$G$40,2,0)," ")
 
Upvote 0
On 2002-03-22 11:53, RICK_D wrote:
I am working with a VLOOKUP formula. How can I subsitute the #N/A into a 0?

I don't want the results to say #N/A if it does not find the value. I want it to show 0.

Any help would be appreciated!!
Thanks in advanced!!

Return your VLOOKUP results to a hidden column and use an IF function to test for presence of #N/A.

=IF(ISNA(A2),0,A2)
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,434
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top