View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Obtaining cell reference from index function

How about just:

myX = .SeriesCollection(Arg1).XValues(Arg2+2).Value

HTH,
Bernie
MS Excel MVP


"MH UK" wrote in message
...
I am attemtping to build custom screen tips for a scatter graph and already
been given some help. However I am stuck again. The following code extract

myX = WorksheetFunction.Index _
(.SeriesCollection(Arg1).XValues, Arg2)
' Extract y value from array of y values
myY = WorksheetFunction.Index _
(.SeriesCollection(Arg1).Values, Arg2)

populates two variables (myX and myY) which correspond to the x and y
values. What I am having trouble with is obtaining the cell reference to
either offset from to obtain the data I wish to display in my custom screen
tip.
If for example, myX extracts a value from cell B3, i need to access B5 for
my custom data.
I must be getting close.

Thanks to anyone who helps me in my (hopefully) final hurdle.