Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can you hide a tab for a single worksheet in Excel? TDC Excel Discussion (Misc queries) 0 February 20th 07 09:53 AM
is there a way to hide a whole worksheet in excel? Marion McFarlane Excel Discussion (Misc queries) 2 November 14th 05 12:44 AM
How do I automatically hide columns in a worksheet based on a cell value? dkhedkar Excel Worksheet Functions 1 March 5th 05 12:20 AM
How do I hide a worksheet in Excel and use a password to un-hide . Dchung Excel Discussion (Misc queries) 3 December 2nd 04 06:24 AM
Excel VBA-hide row worksheet event kabrahani Excel Programming 2 April 3rd 04 06:18 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"