TheMacroNoob
Board Regular
- Joined
- Aug 5, 2022
- Messages
- 52
- Office Version
- 365
- Platform
- Windows
Hello,
I am only just getting started with macros in excel and I am not sure how to create a macro to enable an action if not enabled, and disable an action if enabled.
I can record macro and complete my action, and then record another to reverse, but I would love to have some guidance on how to write a macro that does both.
There are two actions I would like to perform:
First:
In the PivotTable dropdown: Value Filters > Top 10... > Top 10 Items by "Total Incurred".
Second:
Then, once the button is hit again, I would like it to "Clear Filter".
Ideally, the button would filter all pivot tables in Active Sheet.
Is there a simple solution to this? Could anyone point me in the direction of a resource to learn how?
Thank you for your time.
I am only just getting started with macros in excel and I am not sure how to create a macro to enable an action if not enabled, and disable an action if enabled.
I can record macro and complete my action, and then record another to reverse, but I would love to have some guidance on how to write a macro that does both.
There are two actions I would like to perform:
First:
In the PivotTable dropdown: Value Filters > Top 10... > Top 10 Items by "Total Incurred".
Second:
Then, once the button is hit again, I would like it to "Clear Filter".
Ideally, the button would filter all pivot tables in Active Sheet.
Is there a simple solution to this? Could anyone point me in the direction of a resource to learn how?
Thank you for your time.