arthuritus
arthuritus

Reputation: 111

Excel - dynamic chart x axis - ignore x categories with no data

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:

If there is something wrong with the Y values (blank, non-numeric etc), I want to dynamically exclude the corresponding series from the chart

Non-VBA solutions preferred = )

Upvotes: 3

Views: 26828

Answers (2)

Alan Paschoal
Alan Paschoal

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

Arun Kumar Khattri
Arun Kumar Khattri

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 -

enter image description here

  • 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)

    • X has formula

    =IF(ISNUMBER(G4),INDEX(C4:C15,MATCH(G4,F4:F15,0)),"")

    • Y has formula

    =VLOOKUP(H4,C4:D15,2,FALSE)

drag down all the formulas after entering into first rows....

Now you can plot chart from continuous data -

enter image description here

Upvotes: 2

Related Questions