Thx for the replies. I read the forum rules and will keep those in mind. 
About my code: I 'analysed' it and I understand 80% of what it is doing. I failed to make my source-sheet-choice 'dynamic'.
I understand that the result is in 'pivottable8'. Do I need to change that? The result-pivottable is ok....but the sourcesheet on which the pivot is made should be dynamic...
Is my problem clear? I can imagine you need more info.
'STX main diverter is the name of the sheet. I would like to make this dynamic. So: difine the sheetname in a cell...and refer to the cell? But how?
let me add the whole macro:
Bookmarks