ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   To show "0" instead of #N/A (https://www.excelbanter.com/excel-discussion-misc-queries/75545-show-0-instead-n.html)

widman

To show "0" instead of #N/A
 
If cel C1 is A1-B1, how can I get C1 to show 0 if one of A1 or B1 is #N/A
instead of C1 ending up also #N/A?


Chris Marlow

To show "0" instead of #N/A
 
Hi,

Use an IF & OR with ISNA() function;

=IF(OR(ISNA(A1),ISNA(B1)),0,A1-B1)

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"widman" wrote:

If cel C1 is A1-B1, how can I get C1 to show 0 if one of A1 or B1 is #N/A
instead of C1 ending up also #N/A?


Dave Peterson

To show "0" instead of #N/A
 
=if(iserror(a1-b1),0,a1-b1)



widman wrote:

If cel C1 is A1-B1, how can I get C1 to show 0 if one of A1 or B1 is #N/A
instead of C1 ending up also #N/A?


--

Dave Peterson

Ron Coderre

To show "0" instead of #N/A
 
Try something like this:

=IF(ISNA(A1-B1),0,A1-B1)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"widman" wrote:

If cel C1 is A1-B1, how can I get C1 to show 0 if one of A1 or B1 is #N/A
instead of C1 ending up also #N/A?



All times are GMT +1. The time now is 06:11 AM.

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