Hi all
I'm still at intermediate level when it comes to VBA, spend a lot of time lurking on here and adapting code as needed.
I have a pivottable and am using VBA to create different views.
One of the Fields is "Forecast Flag" which has values of either "Yes" or "No". The pivot dropdown, however, shows "Yes, No, (blank)".
I can successfully manipulate the Pt to filter the Pf to "No".
However, after copying and pasting this info to a new sheet, I then want to change the Forecast Flag to "Yes" only.
When changing the filter back from "No" to "Yes", it selects BOTH "Yes" and "No".
To do this, I run the same code but "in the inverse form".
When I duplicate the code in "equal and opposite form", it then gives me the desired result - see code below to understand what I mean by "inverse form" and "equal and opposite form"
Initially, this code is used to filter on "No"
Later on, I am using this code to swith to "Yes"
Weird.. can anybody spot the problem here or otherwise advise how to do this more efficiently?
I'm going to be creating about 5 or 6 different views and would hate to have duplicate/inefficient code in my module.
Thanks.
Bookmarks