Getting rid of #N/A

neospec

New Member
Joined
Oct 19, 2006
Messages
23
I have a formula, but when it is unable to retrieve information it gives a #N/A error.

Is there anyway to change this error to $0.00 or to get rid of it completely?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
=IF(ISNA(VLOOKUP(A1,B1:C20,2,FALSE))=TRUE,"",VLOOKUP(A1,B1:C20,2,FALSE))

Modify the Vlookup functions to suit your needs. This will result in blank if result of vlookup is #N/A. You can also put $0.00 inside the Quotation marks if you want it to display $0.00 when result is #N/A.
 
Upvote 0
My formula is currently

=INDEX(INDIRECT("'[2006SalesReport.xls]January06'!I1:i2000"),MATCH($B21,INDIRECT("'[2006SalesReport.xls]January06'!C1:C2000"),0)+2)

So, how would I implement

=IF(ISNA(VLOOKUP(A1,B1:C20,2,FALSE))=TRUE,"",VLOOKUP(A1,B1:C20,2,FALSE))
 
Upvote 0
you dont need the vlookups

assuming that the result of the formula is a number.

=if(isna(INDEX(INDIRECT("'[2006SalesReport.xls]January06'!I1:i2000"),MATCH($B21,INDIRECT("'[2006SalesReport.xls]January06'!C1:C2000"),0)+2))=true,0,INDEX(INDIRECT("'[2006SalesReport.xls]January06'!I1:i2000"),MATCH($B21,INDIRECT("'[2006SalesReport.xls]January06'!C1:C2000"),0)+2))

you could replace the 0 with "" depending on what you want there.
 
Upvote 0
I found 2 ways. I'm pretty new here, I'm sure somebody else will find a better way.

Method 1, (and the easier way if you ask me)

Add a collumn next to the collumn with your formula and use this.

Collumn A contains your formula

Collumn B
=IF(ISNA(A1)=TRUE,"$0.00",A1)

Then if you want, you can hide the collumn that contains the main formula.

Method 2 seems far too extreme to me (looks like sand112281 already did this one)

Applying the isna function to your existing formula would make the formula extremely long. But here's how you would do it. Just insert your formula (without the equal sign) in both places where I put a vlookup formula. Something like this :

=IF(ISNA(Insert your formula here)=TRUE,"$0.00",Insert your formula here)

=IF(ISNA(INDEX(INDIRECT("'[2006SalesReport.xls]January06'!I1:i2000"),MATCH($B21,INDIRECT("'[2006SalesReport.xls]January06'!C1:C2000"),0)+2))=TRUE,"$0.00",INDEX(INDIRECT("'[2006SalesReport.xls]January06'!I1:i2000"),MATCH($B21,INDIRECT("'[2006SalesReport.xls]January06'!C1:C2000"),0)+2))
 
Upvote 0
I have a formula, but when it is unable to retrieve information it gives a #N/A error.

Is there anyway to change this error to $0.00 or to get rid of it completely?

Try:

=IF(ISNUMBER(MATCH($B21,INDIRECT("'[2006SalesReport.xls]January06'!C1:C2000"),0)+2),INDEX(INDIRECT("'[2006SalesReport.xls]January06'!I1:i2000"),MATCH($B21,INDIRECT("'[2006SalesReport.xls]January06'!C1:C2000"),0)+2),0)

and format the cell accordingly
 
Upvote 0
Should've worked. But you could take out the +2 from the Match condition after the IF()...

=IF(ISNUMBER(MATCH($B21,INDIRECT("'[2006SalesReport.xls]January06'!C1:C2000"),0)),INDEX(INDIRECT("'[2006SalesReport.xls]January06'!I1:i2000"),MATCH($B21,INDIRECT("'[2006SalesReport.xls]January06'!C1:C2000"),0)+2),0)
 
Upvote 0

Forum statistics

Threads
1,215,856
Messages
6,127,365
Members
449,381
Latest member
Aircuart

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