Excel Power Query might be able to do this easier than VBA. https://www.excel-university.com/imp...h-power-query/