Rsquare value off a chart

  • [FONT=Comic Sans MS]I have the following code and I want to extract the RSquared value off the chart to do futher calculations. Any idea's on how to do this?



    Thank you,
    Brian G

    [SIZE="6"][FONT="Comic Sans MS"]Brain G.[/FONT][/SIZE] :loopain:

  • Re: Rsquare value off a chart


    Hi


    Try this to extracat the text from the Rsquared data label.

    Code
    Sub x()
        Dim strTemp As String
        
        strTemp = ActiveChart.SeriesCollection(1).Trendlines(1).DataLabel.Text
        MsgBox "R²=" & Mid(strTemp, InStr(strTemp, "=") + 1)
        
    End Sub

    [h4]Cheers
    Andy
    [/h4]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!