View Single Post
  #4   Report Post  
Tushar Mehta
 
Posts: n/a
Default

I fear Jon's comment may mislead you on the complexity of the task at
hand. I, for one, would not undertake this except as a paid assignment
and even then with a lot of caveats to address various issues, some of
which are highlighted below.

You have to do a whole bunch of things, none of which is simple. Not
that they cannot be done, just that this is not an easy project.

Of course, even before we get started, you have to define what
'exclude' means. Do you show fewer points or do you leave a hole? If
you show fewer points and there are multiple series in the chart what
is the consequence for them? Anyway, assuming all the definitional
issues are resolved...

First, you will have to identify the point that has been clicked.
Jon's article will help there.

For the rest of the work below, you will have to deal with the x and y
sources (and for a bubble chart the size source) in a coordinated
fashion.

Now, you need to know the source of the series. Unfortunately, there
is no easy way to do this. You will have to parse the SERIES formula.
The code in John Walkenbach's tip (http://j-
walk.com/ss/excel/tips/tip83.htm) forms a great starting point. I
suspect -- but am not sure -- that you will have to enhance John's code
to deal with your specific case.

OK, now that you have the source for the series, figure out which item
in the source corresponds to the clicked point.

Next, if the source is a literal array, it will be relatively easy to
exclude the value. Of course, this is subject to the definition of
exclude as discussed above.

If the source is a range, you will have to subtract the cell
corresponding to the clicked point from the current range. Again,
while possible, not trivial. Lacking a XL/VBA function, various people
have shared code for this including a neat little trick using a new
worksheet from Tom Ogilvy. You will have to search the google.com
archives of the XL NGs to get the code.

If the source is a named range/formula, you are SOL. I cannot think of
any safe and reliable way to muck with it.

Finally, you have to set the series to this new range/array. This is
the easiest part. :)

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article .com,
says...
Thanks Jon.

I've printed your article and will give it a try. It may take a day or
two as I'm fumbleing my way through macro development.
I'll let you know my progress.

Randy