[英]Excel - dynamic chart x axis - ignore x categories with no data
I have a predefined list of x labels, eg months of the year. 我有一个x标签的预定义列表,例如一年中的月份。 I want to dynamically exclude some of these from my excel plot, eg if some of the y values are blank, zero or errors. 我想从我的excel图表中动态排除其中一些,例如,如果某些y值为空白,零或错误。
Things I've tried: 我尝试过的事情:
Non-VBA solutions preferred = ) 首选非VBA解决方案=)
Buddy, seems Non-VBA solution is still to be found, as solution lies on hiding the said row. 伙计,似乎仍然可以找到Non-VBA解决方案,因为解决方案在于隐藏所述行。 However if you are bent on finding non-vba solution then here is very crude solution - suppose this is the data (C3:I15) with the helper columns which has been described below - 但是,如果您一心一意地寻找非vba解决方案,那么这里的解决方案非常简单-假设这是带有帮助器列的数据(C3:I15),如下所述-
helper column (hC1) has formula 助手列(hC1)具有公式
=IF(ISNUMBER(D4),1,"") = IF(ISNUMBER(D4),1, “”)
hC2 has formula hC2具有公式
=IFERROR(E4*ROW(),"") = IFERROR(E4 * ROW(), “”)
hC3 has formula hC3具有公式
=SMALL($F$4:$F$15,ROW()-3) =小($ F $ 4:$ F $ 15,ROW() - 3)
=IF(ISNUMBER(G4),INDEX(C4:C15,MATCH(G4,F4:F15,0)),"") = IF(ISNUMBER(G4),INDEX(C4:C15,MATCH(G4,F4:F15,0)), “”)
=VLOOKUP(H4,C4:D15,2,FALSE) = VLOOKUP(H4,C4:D15,2,FALSE)
drag down all the formulas after entering into first rows.... 进入第一行后,向下拖动所有公式。
Now you can plot chart from continuous data - 现在您可以根据连续数据绘制图表-
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.