Discussion Locked

How to display Excel formula in a chart

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Is there a function within Excel where you can highlight a line on a
chart and Excel will determine the formula for the line?

I can see data values just fine, but I would like to see formulas.

6 replies

by dklippert

Scroll to the bottom of the page. John includes a spreadsheet to download with the code.

by igp

Sub FormulaChart()
Dim MyChart As New ChartSeries
With MyChart
Chart = Sheets(1).ChartObjects(1).Chart
ChartSeries = 1
If .XValuesType = "Range" Then
MsgBox .XValues.Address
ElseMsgBox .XValues
End If
End With
End Sub

This discussion is closed to new replies.