Reputation: 111
I have a predefined list of x labels, e.g. months of the year. I want to dynamically exclude some of these from my excel plot, e.g. if some of the y values are blank, zero or errors.
Things I've tried:
Non-VBA solutions preferred = )
Upvotes: 3
Views: 26828
Reputation: 1
I´ve posted anything here, but i found a solution for this, and it really really helped.
So the solution creates a X axis that is actually dynamic, and will "grow" as you add more numbers, automatically.
It uses "named ranges" (crt+f3) to stabilish ranges and you add those later in your graphic. Check the link to see how it works.
[Link of the source][1] [1]: https://exceljet.net/charts/dynamic-chart-ignore-empty-values
Upvotes: 0
Reputation: 1628
Buddy, seems Non-VBA solution is still to be found, as solution lies on hiding the said row. 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 -
helper column (hC1) has formula
=IF(ISNUMBER(D4),1,"")
hC2 has formula
=IFERROR(E4*ROW(),"")
hC3 has formula
=SMALL($F$4:$F$15,ROW()-3)
=IF(ISNUMBER(G4),INDEX(C4:C15,MATCH(G4,F4:F15,0)),"")
=VLOOKUP(H4,C4:D15,2,FALSE)
drag down all the formulas after entering into first rows....
Now you can plot chart from continuous data -
Upvotes: 2