Filter Choice in Chart Title

K

kcrippe1

Is there a way to reference a filter choice in a chart title? I have
a column with about 7 validsets. If the user choses one of those, I
would like the choice to be displayed in an associated chart title. I
understand that I can reference a cell in the chart title, so really
the question is; How do I reference a selected filter choice in
another cell?

Unfortunately I can't use pivots for this, since the chart is an XY
scatter.

Thanks,
Kevin
 
D

Don Guillett

You could use this UDF in a cell. Put the code in a REGULAR module and type
=st() somewhere.

Function st()
x = Cells(Rows.Count, "b").End(xlUp).Row
st = Cells(x, "b")
End Function
 
K

kc

Ok - so now I notice that the result doesn't calculate after another
filter choice.

How can I force a calculation of this cell after a filter choice has
been made?
 
D

Don Guillett

When I tested it, it did. Just add this as the FIRST line of the function

application.volatile
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top