Hi guys
Problem: I have a list of cities. Some of these cities have population data and some don't. I have a slicer which is related only to the cities which do have population data (i.e. cities with no data do not appear in the slicer). Basically, I have written a macro which goes through the total list of all cities and, one by one, selects them in the slicer and reports a value from an associated PivotTable. However, this doesn't entirely work as the macro encounters cities which are not in the slicer and gives me an error.
Question: How could I write VBA code to detect whether a city is in the slicer or not? Ideally, I want something like 'If City is in slicer, then...'.
Thanks in advance!
Bookmarks