General discussion

Locked

Return 0 instead of N/A with Vlookup

By notso ·
Does anyone know how I can change the return result to zero instead of #N/A when the result is false, I thought of using an IF statement but I cant seem to get the syntax right.

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Chuck_Huffman In reply to Return 0 instead of N/A w ...

You can use the ISNA() function which will return a true if the value is "NA" to evaluate your vlookup in a if statment ie
=IF(ISNA(VLOOKUP(H3,I3:J9,1,FALSE)),0,VLOOKUP(H3,I3:J9,1,FALSE))

Collapse -

by notso In reply to

Poster rated this answer.

Collapse -

by Lord Foul In reply to Return 0 instead of N/A w ...

In your lookup table (table array) add another row at the top that accomodates the 0 value. remember to always sort the table from lowest value to highest, top/down.

you will then return a 0 value

Collapse -

by notso In reply to Return 0 instead of N/A w ...

This question was closed by the author

Back to Software Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums