Vlookup to return zero if N/A

Thanks:  0
Likes:  0

# Thread: Vlookup to return zero if N/A

1. ## Vlookup to return zero if N/A

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.

2. ## Re: Vlookup to return zero if N/A

Try

=IF(ISNA(VLOOKUP(...)),0,VLOOKUP(...))

Hope that helps.

3. ## Re: Vlookup to return zero if N/A

And if you have Excel 2007 or higher:

=IFERROR(VLOOKUP(...),0)

4. ## Re: Vlookup to return zero if N/A

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?

5. ## Re: Vlookup to return zero if N/A

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.

6. ## Re: Vlookup to return zero if N/A

That is why you are an MVP and I am just a novice. Thanks for the help, you rock!

7. ## Re: Vlookup to return zero if N/A

Glad to help....

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

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•