Negative Zero (-0) Exporting to Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've come across an issue I can't seem to understand or resolve. Would
appreciate it if someone could help me out.

I'm getting financial data from an ODBC source and then performing a simple
subtraction calculation of two fields. With the format set at 15 decimals,
the 2 numbers are the same. When I subtract one from the other, in Access it
returns "0".

That's all just fine. However, when I copy that query result into Excel, the
number is "-0". Why is that? It prevents me from creating a formula with an
IF statement that something like " =IF(b1=0,0,4/2) ". I need the number to
return 0, not negative 0.

Helllp??
 
Using if(ABS(b1)=0,... (or if(--b1=0,...) worked.

However.. I still don't understand why it would export as a negative 0 when
it should already be absolute zero.

(By "export" I mean copy and paste the data from and Access query into Excel
to perform further calculations.)

p.s. "4/2" is a simple example of the formula I'm using for the purpose of
explanation here.
 
For some reason it is importing it as text. You can force a change by
copying a blank cell and then using "paste special" on the cells in question
(simply select all your data). Select add and click ok. All -0's should be
converted to the number 0.
 
I was getting (0.00) with number format. I changed to currency and it displayed correctly as 0.00

Changing back to number format kept the correct display. Excel 2010
 
Back
Top