#DIV/O! or #N/A problems

audrey

Active Member
Joined
Jul 30, 2008
Messages
491
Hello,

it might be a simple question for most of you but, when I try to retrive data I sometimes get the following errors like

#DIV/O! or #N/A

those are apparering in case like

=HPVAL(F10, B94, F9, F7, F8) or even simplier cases like 0 minus 0 !!!

is there a way to ignore them automatically from options or an if function so that if data cannot be calculated or retrived simply fill the cell with '0'
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
For #N/A you can use this:

=IF(ISNA(your_formula),"",your_formula)

You can also use the more wide ranging:

=IF(ISERROR(your_formula),"",your_formula)

Be a little careful using ISERROR though as it will mask all errors in your formula.

If you have 2007 you should also look at the IFERROR function.

Dom
 
Upvote 0
thanks guys


@Dom

If I understood correctly, in case of an error is this formula leaves that cell blank ?

=IF(ISNA(your_formula),"",your_formula)

and in this case

=IF(ISNA(your_formula),"0",your_formula)

fills with zero ?
 
Upvote 0
Nearly...

=IF(ISNA(your_formula),"0",your_formula)

...will put 0 in but it will be a text string. For a numeric value to be returned use:

=IF(ISNA(your_formula),0,your_formula)

Dom
 
Upvote 0
For #DIV/0! you really just need to test that the divisor isn't 0 like this:

=IF(B1=0,0,A1/B1)

Dom
 
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