Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Okay, want to learn this once and for all, how _do_ we get rid of zeros formulaically?

Okay, once and for all, I really need to learn how to deal with zeros.
Whenever I've had a problem, if I can't phase it out with conditional
formatting and coloured cells, I've asked a couple of times or so for
help on individual cases to get rid of the zeros properly through the
formula. But I've looked through various examples and I can't see the
pattern. So perhaps some kind soul can give me a general overview?
Perhaps my brain will register once and for all how to deal with those
pesky zeros that come up due to results of a formula based on, as yet,
empty source fields?

In this good example of what I'm trying to fix today, it's a simple
formula:

=SUM('2007-2009'!L22:O22)

When the source sheet has no data in it in the pertinent cells, then
the target sheet where this formula is in shows a "0". We need to
keep the cells truly blank in those cases.

Thanks! :oD

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Okay, want to learn this once and for all, how _do_ we get rid ofzeros formulaically?

Hello,
Can you reformat the cell? Format Cells/Custom/ and formatting it as #
should clear it, or you can do =if(SUM('2007-2009'!
L22:O22)=0,"",SUM('2007-2009'!L22:O22))

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Okay, want to learn this once and for all, how _do_ we get rid of zeros formulaically?

If a cell has a formula it cannot be truly blank.

=IF(SUM('2007-2009'!L22:O22)=0,"",SUM('2007-2009'!L22:O22))

Will look blank if result is 0


Gord Dibben MS Excel MVP

On Fri, 15 Aug 2008 15:07:57 -0400, StargateFanNotAtHome
wrote:

Okay, once and for all, I really need to learn how to deal with zeros.
Whenever I've had a problem, if I can't phase it out with conditional
formatting and coloured cells, I've asked a couple of times or so for
help on individual cases to get rid of the zeros properly through the
formula. But I've looked through various examples and I can't see the
pattern. So perhaps some kind soul can give me a general overview?
Perhaps my brain will register once and for all how to deal with those
pesky zeros that come up due to results of a formula based on, as yet,
empty source fields?

In this good example of what I'm trying to fix today, it's a simple
formula:

=SUM('2007-2009'!L22:O22)

When the source sheet has no data in it in the pertinent cells, then
the target sheet where this formula is in shows a "0". We need to
keep the cells truly blank in those cases.

Thanks! :oD


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Okay, want to learn this once and for all, how _do_ we get rid of zeros formulaically?

On Fri, 15 Aug 2008 12:38:30 -0700, Gord Dibben <gorddibbATshawDOTca
wrote:

If a cell has a formula it cannot be truly blank.

=IF(SUM('2007-2009'!L22:O22)=0,"",SUM('2007-2009'!L22:O22))

Will look blank if result is 0


You're right. I got that wrong. I see now that I'm actually really
using the formula above that I didn't foresee something. When the
source cell(s) are _blank_ the target cell should be blan; but when
the value is "0", it should reflect "0". Does that make sense?

The reason this important to differentiate is since this workbook is
dealing with year-to-date issues. Anything after today will be blank
but should not show zeros in the summary YTD as these haven't occurred
yet. But though the fiscal year is still relatively short, there have
been months where no expenditures occurred in various categories so
they must, indeed, reflect 0.

I've put the above formula into my tips folder because it is very
valuable. But how would the real case that I'm dealing with today be
dealt with? I promise that I'll use that as a template from now on!
I think I have enough "0" cases to cover everything after we get this
one resolved <g I know how to deal with so many other issues because
I keep them in my tips folder and just copy/paste when needed and
modify the figures, also as needed. I'm just missing these zero-case
scenarios. <g

Thanks!!! :oD


Gord Dibben MS Excel MVP

On Fri, 15 Aug 2008 15:07:57 -0400, StargateFanNotAtHome
wrote:

Okay, once and for all, I really need to learn how to deal with zeros.
Whenever I've had a problem, if I can't phase it out with conditional
formatting and coloured cells, I've asked a couple of times or so for
help on individual cases to get rid of the zeros properly through the
formula. But I've looked through various examples and I can't see the
pattern. So perhaps some kind soul can give me a general overview?
Perhaps my brain will register once and for all how to deal with those
pesky zeros that come up due to results of a formula based on, as yet,
empty source fields?

In this good example of what I'm trying to fix today, it's a simple
formula:

=SUM('2007-2009'!L22:O22)

When the source sheet has no data in it in the pertinent cells, then
the target sheet where this formula is in shows a "0". We need to
keep the cells truly blank in those cases.

Thanks! :oD


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Okay, want to learn this once and for all, how _do_ we get rid

Except if the sum of the range are values that add up to zero then the range
was not blank. It just happened to add up to zero. For that reason I often
use a count as the criteria for my if.

As for the bigger question "What to do about zeros" the answer is...
Depends...

If you are graphing 0 or blank graph as zero so you may need to return #N/A
to avoid a graph that looks like a heart monitor. If you sum up a blank range
it return zero when you may want it to return a blank. If on the other hand
the range contains values that add up to zero then you may want to dispay the
zero. In the end you can also set the View option to just not show zeros...
--
HTH...

Jim Thomlinson


"Gord Dibben" wrote:

If a cell has a formula it cannot be truly blank.

=IF(SUM('2007-2009'!L22:O22)=0,"",SUM('2007-2009'!L22:O22))

Will look blank if result is 0


Gord Dibben MS Excel MVP

On Fri, 15 Aug 2008 15:07:57 -0400, StargateFanNotAtHome
wrote:

Okay, once and for all, I really need to learn how to deal with zeros.
Whenever I've had a problem, if I can't phase it out with conditional
formatting and coloured cells, I've asked a couple of times or so for
help on individual cases to get rid of the zeros properly through the
formula. But I've looked through various examples and I can't see the
pattern. So perhaps some kind soul can give me a general overview?
Perhaps my brain will register once and for all how to deal with those
pesky zeros that come up due to results of a formula based on, as yet,
empty source fields?

In this good example of what I'm trying to fix today, it's a simple
formula:

=SUM('2007-2009'!L22:O22)

When the source sheet has no data in it in the pertinent cells, then
the target sheet where this formula is in shows a "0". We need to
keep the cells truly blank in those cases.

Thanks! :oD





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Okay, want to learn this once and for all, how _do_ we get rid of zeros formulaically?

Unfortunately a blank cell is treated as a zero by Excel.

If you want the zero to show when the result equates to zero, not just the
result of blank cells, I think you would have to COUNT on the range and if
any zeros, return zero, else return ""

=IF(COUNT('2007-2009'!L22:O22)=0,"",SUM('2007-2009'!L22:O22))


Gord


On Fri, 15 Aug 2008 15:54:16 -0400, StargateFanNotAtHome
wrote:

On Fri, 15 Aug 2008 12:38:30 -0700, Gord Dibben <gorddibbATshawDOTca
wrote:

If a cell has a formula it cannot be truly blank.

=IF(SUM('2007-2009'!L22:O22)=0,"",SUM('2007-2009'!L22:O22))

Will look blank if result is 0


You're right. I got that wrong. I see now that I'm actually really
using the formula above that I didn't foresee something. When the
source cell(s) are _blank_ the target cell should be blan; but when
the value is "0", it should reflect "0". Does that make sense?

The reason this important to differentiate is since this workbook is
dealing with year-to-date issues. Anything after today will be blank
but should not show zeros in the summary YTD as these haven't occurred
yet. But though the fiscal year is still relatively short, there have
been months where no expenditures occurred in various categories so
they must, indeed, reflect 0.

I've put the above formula into my tips folder because it is very
valuable. But how would the real case that I'm dealing with today be
dealt with? I promise that I'll use that as a template from now on!
I think I have enough "0" cases to cover everything after we get this
one resolved <g I know how to deal with so many other issues because
I keep them in my tips folder and just copy/paste when needed and
modify the figures, also as needed. I'm just missing these zero-case
scenarios. <g

Thanks!!! :oD


Gord Dibben MS Excel MVP

On Fri, 15 Aug 2008 15:07:57 -0400, StargateFanNotAtHome
wrote:

Okay, once and for all, I really need to learn how to deal with zeros.
Whenever I've had a problem, if I can't phase it out with conditional
formatting and coloured cells, I've asked a couple of times or so for
help on individual cases to get rid of the zeros properly through the
formula. But I've looked through various examples and I can't see the
pattern. So perhaps some kind soul can give me a general overview?
Perhaps my brain will register once and for all how to deal with those
pesky zeros that come up due to results of a formula based on, as yet,
empty source fields?

In this good example of what I'm trying to fix today, it's a simple
formula:

=SUM('2007-2009'!L22:O22)

When the source sheet has no data in it in the pertinent cells, then
the target sheet where this formula is in shows a "0". We need to
keep the cells truly blank in those cases.

Thanks! :oD


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
when i megre cells that begin with zeros , I lose the zeros RDC Excel Discussion (Misc queries) 1 November 16th 07 03:31 PM
Essbase: Text zeros to number zeros santhu Excel Discussion (Misc queries) 1 March 23rd 07 01:01 PM
Can I formulaically set a cell to blank (non-Text, no value)? [email protected] Excel Worksheet Functions 6 May 4th 06 09:23 AM
Sorting with formulaically "empty" cells [email protected] Excel Worksheet Functions 5 December 28th 05 06:38 PM
save text field w/ leading zeros in .csv format & not lose zeros? Ques Excel Discussion (Misc queries) 1 May 4th 05 06:21 PM


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

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"