Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can you hide a tab for a single worksheet in Excel? | Excel Discussion (Misc queries) | |||
is there a way to hide a whole worksheet in excel? | Excel Discussion (Misc queries) | |||
How do I automatically hide columns in a worksheet based on a cell value? | Excel Worksheet Functions | |||
How do I hide a worksheet in Excel and use a password to un-hide . | Excel Discussion (Misc queries) | |||
Excel VBA-hide row worksheet event | Excel Programming |