![]() |
Is there anyway to hide #DIV/0! in an excel worksheet cell.
I learned how to hide a zero by entering in 0;-0;;@ in the custom format
area. I would like to know if there is anyway to hide #DIV/0! until a valid number is calculated. Thanks |
Is there anyway to hide #DIV/0! in an excel worksheet cell.
That's like killing the messenger when bad news arrive. Better avoiding bad
news, like =IF(B1=0,0,A1/B1) HTH. Best wishes Harald "rlugood" skrev i melding ... I learned how to hide a zero by entering in 0;-0;;@ in the custom format area. I would like to know if there is anyway to hide #DIV/0! until a valid number is calculated. Thanks |
Is there anyway to hide #DIV/0! in an excel worksheet cell.
Hi,
Use an If statement, =If(A1=0, "",B1/A1) or something similar. Thanks, "rlugood" wrote: I learned how to hide a zero by entering in 0;-0;;@ in the custom format area. I would like to know if there is anyway to hide #DIV/0! until a valid number is calculated. Thanks |
Is there anyway to hide #DIV/0! in an excel worksheet cell.
You can't do it with formatting. You might want to write your
formula like =IF(ISERROR(your_formula),"",your_formula) The disadvantage of this approach is that your_formula will be evaluated twice if there is no error. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "rlugood" wrote in message ... I learned how to hide a zero by entering in 0;-0;;@ in the custom format area. I would like to know if there is anyway to hide #DIV/0! until a valid number is calculated. Thanks |
Is there anyway to hide #DIV/0! in an excel worksheet cell.
I am not aware of an elegant way but I know of two work-arounds.
Option 1. Apply conditional formatting to the cell by selecting "Formula Is" and typing "=ISERROR(A1)" where A1 represents the current cell. Format the cell to use the white font color (or whatever color your sheet's background is) when the condition is met. Option 2. Trap for the error in the formula itself, such as "=IF(ISERROR(A1/B1),0,A1/B1)". You can then apply your custom format that hides zero values. Both options add quite a bit of overhead to the file, so I would not recommend using them often in heavy duty financial model or the like. HTH Kid Jones "rlugood" wrote: I learned how to hide a zero by entering in 0;-0;;@ in the custom format area. I would like to know if there is anyway to hide #DIV/0! until a valid number is calculated. Thanks |
Is there anyway to hide #DIV/0! in an excel worksheet cell.
"David" wrote: Hi, Use an If statement, =If(A1=0, "",B1/A1) or something similar. Thanks, "rlugood" wrote: I learned how to hide a zero by entering in 0;-0;;@ in the custom format area. I would like to know if there is anyway to hide #DIV/0! until a valid number is calculated. Thanks |
All times are GMT +1. The time now is 06:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com