Excel 2010: Hide 0 values in Pivot

荒凉一梦 提交于 2019-12-01 06:53:50

问题


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)



来源:https://stackoverflow.com/questions/10705159/excel-2010-hide-0-values-in-pivot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!