Excel.Tips.Net Welcome toExcel.Tips.Net

Helpful Links

Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment

Tips.Net Store

ExcelTips FAQ
ExcelTips Premium

Learn Access Now
Free Printable Forms

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

Newest Tips

Removing Borders

Converting to Octal

Filtering Columns for Unique Values

Printing Multiple Worksheets on a Single Page

Changing the Default Font

Creating a Drawing Object

Determining a Value of a Cell

 

Getting Rid of Negative Zero Amounts

Summary: Have you ever done some calculations, only to see a value appear that is a zero with a negative sign in front of it? This is a result of your display formatting and the precision on Excel's calculations. You can get rid of such seemingly erroneous values, however. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)

When you are creating a worksheet, and you format your cells to display information just the way you want, you may notice that you end up with "negative zero" amounts. Everyone learned in math classes that zero is not a negative number. So why does Excel show some zero amounts as negative?

The reason is because your formatting may call for displaying less information than Excel uses internally for its calculations. For instance, Excel keeps track of numbers out to fifteen decimal places. If your display only shows two decimal places, it is possible that a calculated value could be very small, and when rounded show as zero. If the calculated value is something like –0.000001325, then the value would show with only two digits to the right of the decimal point as –0.00. The negative sign shows, of course, because the internal value maintained by Excel is below zero.

There are a couple of ways you can solve this problem. The first is to simply round the calculated value to the desired number of decimal places. For instance, assume that this is your normal formula—the one that results in the "negative zero" values:

=SUM(A3:A23)

You can round the value in the cell by simply using the following formula instead:

=ROUND(SUM(A3:A23),2)

This usage results in the value being rounded to two decimal places. In this way you should never end up with another "negative zero" value.

Another solution preferred by some people is to force Excel to use the same internal precision as what you have displayed in your worksheet. Just follow these steps if you are using a version of Excel prior to Excel 2007:

  1. Choose Options from the Tools menu. Excel displays the Options dialog box.
  2. Make sure the Calculation tab is selected. (Click here to see a related figure.)
  3. Ensure that the Precision As Displayed check box is selected.
  4. Click on OK.

If you are using Excel 2007, then the steps are a little different:

  1. Click the Office button and then click Excel Options. Excel displays the Excel Options dialog box.
  2. At the left side of the dialog box click Advanced.
  3. Scroll through the list of options until you can see the When Calculating this Workbook group. (Click here to see a related figure.)
  4. Make sure the Set Precision As Displayed check box is selected.
  5. Click on OK.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2576) applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003 | 2007

Step Up and Take Control! Subscribers to ExcelTips know just how valuable a resource it is. ExcelTips Premium provides twice the number of exceptional, easy-to-understand tips every week in an ad-free newsletter, as well as substantial discounts on ExcelTips archives and e-books.
 
Check out ExcelTips Premium today!