Simple (?) Event Question

JustinWWolcott

Board Regular
Joined
Mar 20, 2007
Messages
158
I have a sheet with 14 columns of filtered data which generates a graph.

Is there any way to run a macro whenever one of these filters is changed (for example say I change class year from Junior to Senior, I want the macro to fire).

Thanks,
-JW
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Beate Schmitz

Active Member
Joined
May 20, 2007
Messages
392
Hello,

the filtering itself does not fire an event-macro. But if you e.g. use one formula like SUBTOTAL in my following example:
Excel Workbook
ABC
113
2Value1Value2Value3
3432363
4439728
5453995
634598
766377
8287989
9823836
1031619
1162322
12853945
13697449
14725932
15461942
Sheet


you can use a Worksheet_Calculate to start the code:

<div style="background-color:#FFFFFF; border-width:2px; border-style: groove; border-color:#ff9966; padding:4px;"><nobr><span style="font-family:Courier New,Arial; font-size:9pt ;" ><span style="color:#000080"; >Private</span> <span style="color:#000080"; >Sub</span> Worksheet_Calculate()
    MsgBox <span style="color:#800000"; >"Hello"</span>
<span style="color:#000080"; >End</span> <span style="color:#000080"; >Sub</span>
</span></nobr></div>
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,204
Messages
5,835,966
Members
430,398
Latest member
Wookiee_

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top