ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   replace error by value (https://www.excelbanter.com/excel-discussion-misc-queries/1405-replace-error-value.html)

Fabbe

replace error by value
 
Hi,

Can anyone tell me how I can change an error msg (f.e.
#DIV/O!) by any value ?

I have a formula that generates an error msg, but I want
to change it by ZERO.

Thanks,
Fabian

Jason Morin

=IF(ISERROR(your_formula),0,your_formula)

HTH
Jason
Atlanta, GA

-----Original Message-----
Hi,

Can anyone tell me how I can change an error msg (f.e.
#DIV/O!) by any value ?

I have a formula that generates an error msg, but I want
to change it by ZERO.

Thanks,
Fabian
.


Frank Kabel

Hi
change your formula to something like
=IF(B1=0,0,A1/B1)

--
Regards
Frank Kabel
Frankfurt, Germany

"Fabbe" schrieb im Newsbeitrag
...
Hi,

Can anyone tell me how I can change an error msg (f.e.
#DIV/O!) by any value ?

I have a formula that generates an error msg, but I want
to change it by ZERO.

Thanks,
Fabian



Francis Hayes (The Excel Addict)

Modify your formula to check for ERROR

Example:
=IF(ISERROR(A1/$A$20),0,A1/$A$20)

Hope this helps,
Francis Hayes (The Excel Addict)
www.TheExcelAddict.com



"Fabbe" wrote:

Hi,

Can anyone tell me how I can change an error msg (f.e.
#DIV/O!) by any value ?

I have a formula that generates an error msg, but I want
to change it by ZERO.

Thanks,
Fabian



it would help to know your formula.
somewhere in your formula, it is trying to devide by zero.
example. a1 = 5, b1 = 0. formula - =(a1/b1) = #Div/0
if you want a zero instead of #Div/0 use this

=if(b1=0,0,a1/b1)

-----Original Message-----
Hi,

Can anyone tell me how I can change an error msg (f.e.
#DIV/O!) by any value ?

I have a formula that generates an error msg, but I want
to change it by ZERO.

Thanks,
Fabian
.



All times are GMT +1. The time now is 03:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com