Rather than hardcoding anything you will have to amend yourself within the code each time necessary the better is to
add a 'Settings' worksheet between worksheets 'Master Template" & 'AA' in order to create an headers table conversion :
first copy the 'Master Template' headers to 'Settings' first row.
Then for each worksheet from 'AA' to the last, check each header name with the 'Settings' first row and
when a header does not exists in 'Settings' just add it in 'Settings' in its relative column (but avoid any duplicate)
so it should be easy in the VBA procedure to copy the data according to the 'Settings' conversion table.
Once you have done the necessary, attach the updated workbook
with data and expected result accordingly (far better than any guessing challenge !)
and post you have done the job in order some helper could give it a try …
But obviously with smart worksheets with exact same headers than the source
just using a kid level Excel basics advanced filter should need less than ten codelines !
Bookmarks