I hope I can explain reasonably well what I'm trying to do here.
I have a worksheet which contains a pivot table which has a number of fields set up, for example one of these is called "Name". I need to run a macro which will loop through each of the various values of "Name" (there are about 50) and if that particular value of Name matches a list of unique occurances of Name in a dynanic named range in another sheet in the same workbook then I need to filter by that Name only in the pivot table then create a new workbook and paste special values the filtered extract of that pivot table into a sheet into the new workbook, save it and then close the new workbook, before moving on to the next value of "Name".
I am ok with the copying and pasting into a new workbook part because I already have some code that is working ok for this part. What I am struggling with and would appreciate some help with is the bit where there is a variable list / range of "Names" in a sheet and using that list to iterate through the pivot table, filter the relevant names one by one seperately only if the name matches what is on the range (ignoring any names on the pivot that are not on the range) and then moving on to the next value of Name in the pivot and then checking if it is the range etc etc. I think it should be a kind of for next loop or case statement with an array contained values in the range, being checked against the values in the pivot table Name field but I just can't translate my thoughts into the code.
I hope I have explained this well enough of course I can provide some clarification if necessary. Any help would be great.