A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Benda D wrote:
Although none of our data has more than 2 digits after the decimal we tried your suggestion. Unfortunately, this was not the answer.
I agree that Shane's formatting suggestion does not address the problem.
But Shane's explanation of the root cause of the problem is correct. Cells formatted as Accounting will display $- only if the cell value is __exactly__ zero. If the cell value is between zero and about +/- 0.0049, it will appear as $0.00 or $(0.00) when the cell is formatted to display 2 decimal places.
You can easily confirm that fact by entering 0.0049 and -0.0049 into such cells. Or with your data, take Shane's suggestion: temporarily for debugging purposes only, change the format of the cell to display, say, 17 decimal places.
You say that "none of our data has more than 2 digits after the decimal [point]". That may or may not be correct, depending on facts that you have not provided.
Even if you have constants with only 2 digits, arithmetic with those constants might not result in exactly zero. Consider this example: if A1 is 10.10, A2 is 10.00, A3 is =A1-A2, and A4 is =A3-0.10, A3 will display $(0.00) instead of $-.
The reason is complicated to explain fully. In a nutshell, it has to do with the way that Excel stores numbers and performs arithmetic (called binary floating point). See KB 78113 athttp://support.microsoft.com/kb/78113 .
However, it is also important to note that if you have formulas that display 2 decimal places because of your formatting choice, the actual underlying value might have more decimal places (unless you have the Precision As Displayed calculation option set, which should not be recommended without a lot of caveats).
For example, if A1 is =1/3, it will display as $0.33 when the format is Account with 2 decimal places. But =100*A1 will display as $33.33, demonstrating that what appears to be $0.33 is really at least 0.3333 (and really about 0.333333333333333). WYSI(not)WYG. ;-)
To correct the situation, I suggest that you explicitly round any formula that you want to result in "exact" dollars and cents. In my examples, A3 should be =ROUND(A1-A2,2) and A4 should be =ROUND(A3-0.10,2).
Alternatively, it is tempting set the Precision As Displayed calculation option. That does avoid having to round explicitly in most (but not all) cases. But if you choose to experiment with PAD, be sure to make a copy of your Excel file first. PAD can cause undersirable changes in constants, which are irreversible.