View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andibevan[_4_] Andibevan[_4_] is offline
external usenet poster
 
Posts: 103
Default Have empty cell unless result of formula isn't value of "0"?

This reason for negative zeros may be something to do with rounding - i.e.
although it says -0.00 it may actually be -0.00000001 -- Try copying the
cell and doing paste special values and then increase the decimal places.

I think this is likely to be the reason as it is mathematically impossible
to have a negative zero and I presume that Excel is governed by this
mathematical principal as well.

With regards to your second problem try this in cell G3

=If((E3<"",F4-SUM(D3-C3)-TIME(7,30,0),"")=0,"",(E3<"",F4-SUM(D3-C3)-TIME(7
,30,0),""))

HTH

Andi


"StargateFanFromWork" wrote in message
...
I have a great spreadsheet that's really been a life-saver. Just one

thing
I'd like to fine-tune. In column G, specifically in cell G3, I have the
following code:

=IF(E3<"",F4-SUM(D3-C3)-TIME(7,30,0),"")

Before I ask my question, just want to note that results are funny in one
way: to show "negative" hours in results, I changed to the 1904 system

for
this workbook as per advice from this ng. So that works beautifully.

When
less time is worked during day, the total regular hours worked show as a
negative which is then taken into account in the "overtime". The actual
overtime worked, then, shows "real" overtime worked and not just a result
based on the fact that I worked till such-and-such an hour.

However, the odd thing is that sometimes that column displays as 0h00m and
sometimes it shows up as -0h00m. I haven't figured out why it sometimes
puts that negative sing in. Ultimately, the mathematical end result of

"0"
is the same, of course, but that makes this column awkward. It was this

in
part that prompted me to wish this formula displayed results differently.

Since this is a visual check calculation only in this cell so that I can

see
if a workday has been worked in its entirety, it actually would be better

if
the above code only displayed for any other value other than "0". Is

there
a way, then, to incorporate that into the above formula? i.e., that the
cell will be also be completely blank unless there is a resulting value
other than 0h00m or -0h00m?

Thanks much! :oD