Excel 2010: Hide 0 values in Pivot

2019-05-14 05:14发布

问题:

Is there a way to hide or show a blank cell in a Pivot table for cells that compute to zero?

回答1:

Use a number format to hide zero values in selected cells:

Follow this procedure to hide zero values in selected cells. If the value in one of these cells changes to a nonzero value, the format of the value will be similar to the general number format.

1.Select the cells that contain the zero (0) values that you want to hide.
2.On the Format menu, click Cells, and then click the Number tab.
3.In the Category list, click Custom.
4.In the Type box, type 0;-0;;@

Notes

- The hidden values appear only in the formula bar — or in the cell if you edit 
    within the cell — and are not printed.
- To display hidden values again, select the cells, click the Cells command on 
    the Format menu, and then click the Number tab. In the Category list, 
    click General to apply the default number format. To redisplay a date or 
    a time, select the appropriate date or time format on the Number tab.

http://office.microsoft.com/en-us/excel-help/display-or-hide-zero-values-HP005199879.aspx



回答2:

I have tended to do it this way:

  1. Right click on one of the row labels
  2. Select 'Filter'
  3. Select 'Value Filters...'
  4. Select 'Sum of x' 'does not equal' 0 (where x is the value being summed)

The problem is where Excel falsely reckons the sum is a very small non-zero value. Workaround:

'Sum of x' 'is not between' -0.001 and 0.001 (depending on the precision you are working to)