In Excel 2013, I am programmatically adding a chart. To do so, I need to specify WHERE the chart is located. Specifically top, left, height and width. All these coordinates are points, not cell addresses. For example, the default height of a cell if 15 points. I know the cell address where I want the Graph to be located. How do I convert a cell address to a point? There has to be a better way than just iterating through every previous row/column and adding their height/width...
For example, Cell 'F7' might be 120 points left, and have a top point location of 90.
If it helps any, the syntax to add the chart is...
expression.AddChart2(Style,XlChartType,Left,Top,Width,Height,NewLayout)
Try this:
X = Range("N4").Left
Y = Range("N4").Top
I don't have anything to test it on so not sure it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With