Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
when i megre cells that begin with zeros , I lose the zeros | Excel Discussion (Misc queries) | |||
Essbase: Text zeros to number zeros | Excel Discussion (Misc queries) | |||
Can I formulaically set a cell to blank (non-Text, no value)? | Excel Worksheet Functions | |||
Sorting with formulaically "empty" cells | Excel Worksheet Functions | |||
save text field w/ leading zeros in .csv format & not lose zeros? | Excel Discussion (Misc queries) |