Ignore #'¡DIV/0! Values in both axes of a bar chart - Excel

妖精的绣舞 提交于 2019-12-13 04:46:07

问题


I have this bar chart in excel :

As you see, if there is #'¡DIV/0!, the values are 0. What I really want is that the bar chart just shows the numeric values. In this case. just the first three values would have to be visualized. I tried the formula IF.ERROR(FORMULA,"") but the result was the same,

So, How Can I do that?


回答1:


You need dynamic ranges for the chart, or filter the data source to hide the rows with the error. Excel charts will not include data that is hidden with a filter.

To apply dynamic ranges, create two range names with the following formulas:

chtLabels   =OFFSET(chtValues,0,-1)
chtValues   =Sheet1!$B$12:INDEX(Sheet1!$B:$B,MATCH(99^99,Sheet1!$B:$B,1))

Adjust the chtValues range name to start in the first cell with a number in column B instead of B12 of the example.

Edit the column chart series values and enter the range name, preceded by the sheet name, like

=Sheet1!chtValues

Edit the Horizontal axis labels and replace the range with the dynamic named range

=Sheet1!chtLabels

When you exit the dialog, Excel will replace the sheet name with the file name. The result will be similar to this:

Note how the series formula shows the range names instead of the cell ranges.




回答2:


=IFERROR(value, value_if_error) where value_if_error should equal 0 or "" or whatever you want



来源:https://stackoverflow.com/questions/27048942/ignore-div-0-values-in-both-axes-of-a-bar-chart-excel

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