Article ID: 126367
Article Last Modified on 8/15/2005
Worksheets("Sheet1").Range("A1")
However, many functions that return worksheet or chart values return the
<SheetName>!<CellReference> style reference.
Application.GoTo _
Range(Right(ActiveCell.Formula, Len(ActiveCell.Formula - 1))
Sub Select_The_Y_Values()
Dim StartString As Integer
Dim EndString As Integer
Dim SeriesForm As String
' Assign the formula property of the selected series to
' the variable "SeriesForm"
SeriesForm = Selection.Formula
' If a point is selected rather than the entire series, you will
' need to modify the above line to the following
' Selection.Parent.Formula
' Find the position of the first character after the second
' comma in the formula
StartString = InStr(InStr(SeriesForm, ",") + 1, SeriesForm, ",") + 1
' Find the position of the third comma
EndString = InStr(StartString, SeriesForm, ",")
' Strip out the y values (between the second and third commas)
ref = Mid(SeriesForm, StartString, EndString - StartString)
' Pass the Y values to the Range object and select it
Application.GoTo Range(ref)
End Sub
Additional query words: 5.00c 8.00 97 XL97 XL
Keywords: KB126367