I have a pivot table that analyzes how salespeople have performed within different cities.
I am trying to write a macro that will do some comparisons based on each city that the salesperson has gone to. As part of the macro, I loop through each sales person, and nested within that loop, I attempt to loop through each city. however, when I try to do the nested loop by:
it loops through each possible city, instead of just the cities associated with that salesperson.
Note: I am showing a simplified version so it is easier to understand. Because the actual amount of data is very large, I need to keep the pivot table set up as rows within rows, I can't move salespeople or cities into columns.
I've attached the workbook and a screenshot.
Example.jpg
Thanks in advance!
Bookmarks