#N/A to 0 ?

uberathlete

Board Regular
Joined
Jul 11, 2007
Messages
117
Hi everyone. I've got a spreadsheet with vlookup formulas and a number of cells return #N/A as they should. However, instead of #N/A, I would like 0 to appear. How can I do this? Any suggestions would be great. Thanks!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi everyone. I've got a spreadsheet with vlookup formulas and a number of cells return #N/A as they should. However, instead of #N/A, I would like 0 to appear. How can I do this? Any suggestions would be great. Thanks!

If you are on Excel 2007...

=IFERROR(LookupExpression,0)

Otherwise:

If you have installed the free morefunc.xll add-in...

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

=IF(ISNUMBER(SETV(MATCH(...))),INDEX(...,GETV()),0)

Without morefunc...

=IF(ISNUMBER(MATCH(...)),INDEX(...,MATCH(...)),0)

=IF(ISNUMBER(MATCH(...)),VLOOKUP(...),0)
 
Upvote 0
Hi everyone. I've got a spreadsheet with vlookup formulas and a number of cells return #N/A as they should. However, instead of #N/A, I would like 0 to appear. How can I do this? Any suggestions would be great. Thanks!

If you are on Excel 2007...

=IFERROR(LookupExpression,0)

Otherwise:

If you have installed the free morefunc.xll add-in...

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

=IF(ISNUMBER(SETV(MATCH(...))),INDEX(...,GETV()),0)

Without morefunc...

=IF(ISNUMBER(MATCH(...)),INDEX(...,MATCH(...)),0)

=IF(ISNUMBER(MATCH(...)),VLOOKUP(...),0)

Thankfs for your reply Aladin. Just wondering, in MATCH(...) and VLOOKUP(...), should there be something in the (...) ?
 
Upvote 0
You need to replace the ... in the parentheses in Aladin's suggestions with the specifics of your formula.

E.g. if you were using

=VLOOKUP(A1,B1:C10,2,0)

then you could replace this with

=IF(ISNA(MATCH(A1,B1:B10,0)),"",VLOOKUP(A1,B1:C10,2,0))

note: the match function only uses the first column of the range from the VLOOKUP function
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,391
Members
449,080
Latest member
Armadillos

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