View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Charlie[_7_] Charlie[_7_] is offline
external usenet poster
 
Posts: 2
Default Tricky AutoFormat problem

I have a scatter chart based on data in another tab. I wrote a
MouseDown routine which displays the name of the item when you click
on it. I use GetChartElement to return the PointIndex of the entry.

If I use AutoFilter to reduce the list size, the chart only displays
the filtered list (less dots). This is great, but the PointIndex
returned is then based on the *filtered* list, not the whole list, and
I can't figure out how to get the value in the Nth cell down from the
top, counting only the *filtered* (i.e. visible) items.

I have been using

NewText = Sheets("MySheet").Range("D1").Offset(arg2)

where arg2 comes from the GetChartElement function. But the Offset
function only considers the whole list, not the filtered list. Can
anyone give me the syntax that will work even if the list has been
filtered?

Thanks so much for your help!

-- Charlie