Excel - Macro to create chart based on selection
<p>I would like to ask for your help concerning the following issue:
For I have to create a large numbers of charts, I would like to have a macro which would insert the chart based on my selection.
As I do not have any clue about VBA but need it now (as for now, at least - I really should learn to use it on my own), I would appreciate your help.
Basically, I need to know how to adjust the code I recorded, such that the chart will be inserted based on my selection:</p>

<pre><code>Sub chartmacro()
    ActiveCell.Range("A1:E2").Select
    ActiveSheet.Shapes.AddChart2(240, xlXYScatter).Select
    ActiveChart.SetSourceData Source:=Range("Tabelle1!$A$1:$E$2")
End Sub
</code></pre>

<p>I do not know, how to change the values in the "Range"-statement, such that they refer to my selection.</p>

<p>I would be glad, if you could consider my question.</p>

<p>Yours sincerely,
Sinistrum</p>