Vlookup to return zero if N/A

Toastis

Board Regular
Joined
Apr 20, 2011
Messages
65
I can't figure out the if formula combined with my vlookup. I want it to to return a zero if it normally would return an #n/a as a result of the vlookup.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
And if you have Excel 2007 or higher:

=IFERROR(VLOOKUP(...),0)
 
Upvote 0
Thanks now that you helped me with that and it worked, it makes me think I should use some sort of a count formula. Ultimately, I am wanting to see if the date appears on a worksheet and tell me how many times that date appears. Of course I am not as familiar with Count formulas... I don't suppose you know those?
 
Upvote 0
That would be COUNTIF

=COUNTIF(A1:A100,B1)

B1 = the date to look for
A1:A100 = the range to count how many times the date appears in.


Hope that helps.
 
Upvote 0
Glad to help....

Don't worry, we all were novices at some point or another.
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,605
Members
449,038
Latest member
Arbind kumar

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