#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

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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,585
Messages
6,120,397
Members
448,957
Latest member
Hat4Life

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