带有总计和计数的Excel 2016条形图

时间:2016-09-04 16:05:58

标签: excel charts bar-chart

我有类别和价格的excel表。类别正在重复

enter image description here

因为类别正在重复。我无法制作合适的图表。因此,使用 sumif 公式从类别和另一列中删除重复数据来制作临时表,并输出如下 enter image description here

并从下面创建图表 enter image description here

现在我的问题是我们是否可以在图表上添加类别计数,但不添加单独的栏。请告诉我路径

1 个答案:

答案 0 :(得分:0)

我想知道这样的事情是否有用:

SO39318891 example

这是一个堆叠的条形图,上部系列未填充。第二个系列的值来源于:

=COUNTIF(A:A,F2)  

其中原始数据的Category位于ColumnA中,而ColumnF第1行中的var quotes = [ [ "To be prepared for war is one of the most effectual means of preserving peace.", "George Washington" ], [ "One man with courage is a majority.", "Thomas Jefferson" ], [ "National honor is a national property of the highest value.", "James Monroe" ], [ "The only thing we have to fear is fear itself.", "Theodore D. Roosevelt" ], [ "Ask not what your country can do for you, but what you can do for your country.", "John F. Kennedy" ] ]; var currentQuote = 0; function showNewQuote() { if (currentQuote >= 5) { currentQuote = 0; } var Quote = [quotes[currentQuote][0], quotes[currentQuote][1]]; document.getElementById("header").innerHTML = "\"" + Quote[0] + "\""; document.getElementById("paragraph").innerHTML = Quote[1]; currentQuote++; }表示摘要表。

可能不合适,因为(a)是在Excel 2013中创建的,并且(b)如果红色数字的范围很大,则红色数字可能会过度偏离。