alanlambden
Board Regular
- Joined
- Nov 20, 2014
- Messages
- 73
Hi All,
I have multiple tabs I need to merge. I have been able to write the code to merge the into data into one spreadsheet, but sometimes that columns aren't a match. Is there a way I can sweep some VBA code over my workbook and sort the columns depending on the title, ideally going through all the tabs in one run.
Say the tabs are labelled 'Tab1', 'tab2' 'tab3' .... 'tab50'
Here is the example .. Is there a way I can check each tab and identify
if column heading 'blue' exists, move this to columnC.
If column heading 'yellow' exists, move this to columnD and
if column heading 'red' exists, move this to columnE
and so on. I have about 9 columns I need to ensure are all in the same corresponding column.
Also some tabs are missing some of the headings, like 'red' might be missing so:
if column heading 'red' doesn't exist, ignore and move onto the next column and leave it blank.
This would get every column in the correct place, allowing me to run the macro to collate each tab into a master tab.
Thanks for your help with this.
I have multiple tabs I need to merge. I have been able to write the code to merge the into data into one spreadsheet, but sometimes that columns aren't a match. Is there a way I can sweep some VBA code over my workbook and sort the columns depending on the title, ideally going through all the tabs in one run.
Say the tabs are labelled 'Tab1', 'tab2' 'tab3' .... 'tab50'
Here is the example .. Is there a way I can check each tab and identify
if column heading 'blue' exists, move this to columnC.
If column heading 'yellow' exists, move this to columnD and
if column heading 'red' exists, move this to columnE
and so on. I have about 9 columns I need to ensure are all in the same corresponding column.
Also some tabs are missing some of the headings, like 'red' might be missing so:
if column heading 'red' doesn't exist, ignore and move onto the next column and leave it blank.
This would get every column in the correct place, allowing me to run the macro to collate each tab into a master tab.
Thanks for your help with this.