• Add Vertical Line to an Excel chart with VBA

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Add Vertical Line to an Excel chart with VBA

    Author
    Topic
    #495197

    First I am using Excel 2011 for Mac and all I can find on the Web seems to refer to windows versions of Excel.
    I have a cumulative frequency chart (line ) and I would like to add a vertical line/bar for the average in the data set.

    So far I have managed to add a second series with 0 for all the data points but the average,and by changing the chart type for that series to bar it nearly gets there. This seems to be very clumsy and does not really show the proper position of the average as the only way I can create a new series is fit the average into the most appropriate bin. I think i need to pin the average to a X Range that starts at 1 and ends at the highest number in the cumulative frequency.

    While I need to do this using VBA at present I am just trying to put a chart into place on a worksheet. I have the code to build the cumulative frequency chart but that’s all.

    Thanks you any suggestions appreciated.

    Reply To: Add Vertical Line to an Excel chart with VBA

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: