I would like to have the macro change a filter my pivot but instead of a list box (my list box would have over 100 options), I would like the user to be able to enter a reference # on the dashboard and have the macro update the pivot based on what the user entered, am I able to do this?
This is what I tried
Dashboard tab – user enters reference # in cell O30
Pivot tab – cell G28 = cell O30 on the dashboard tab
I recorded/edited the macro and used G28 as my cell reference
Instead of assigning the macro to the list box on the dashboard tab, I assigned it to a shape (a “go” arrow).
The idea was to have the user enter the reference # on the dashboard, click go and the macro would update the filter on the pivot with what the user entered on the dashboard however it did not work.
If I use PivotFields(“Ref_Number”) in the macro editor, I receive a pivot field error.
My pivot is a power pivot so I tried using the table reference that it used when I recorded the macro and it still failed
Any help is appreciated
Thanks
Cindy
Hi Cindy,
Can you please upload a sample file?
Thanks
Thanks Catalin, attached is the sample file
Sorry, can't find the sample file......
Attached is the sample file - thanks again
Hi Cindy
Give this a try.
Just enter the promo code in the Dashboard sheet and click Go.
This updated version checks if the promo reference exist else it will prompt an error message.
Hope this is what you are looking for.