excelgraphtrailing

Excel Graph should not have trailing empty cells take up space on axis


Want to draw a graph on a range of data which length can change depending on user input. So, empty cells at the end of the range should not appear on the graph, and the axis should not have these values at all.

Detail:

Tried:

Edit:

enter image description here

For those of us that don't know how to create a graph using named dynamic ranges (how I did it):


Solution

  • In order to not plot the blank values in the chart, create a dynamic named range to find the non blank values. You can then use those ranges as the chart series.

    This formula will return a range of contiguous values starting at A21.

    =$A$21:INDEX($A21:$A$42,SUMPRODUCT(--(LEN($A$21:$A$42)>0)))