I have a fairly complex macro (for me) to program.
The Workbook contains the following:
--> I would really appreciate if someone could give me hint on how to loop through the headers and more importantly on how to match the names of the headers and the name of the worksheets.
Thank you in advance for the help!
The Workbook contains the following:
- The first Worksheet called “Export” contains 53 columns with headers in row 1 with names such as “Apples”, “Bananas”, “Cherry”, etc.
- The Workbook also contains 53 hidden Worksheets named like the headers in the “Export” Worksheet, i.e. “Apples”, “Bananas”, “Cherry”, etc.
- loop through the columns in Worksheet “Export”
- check if there is data in the column, e.g. in column “Apple” below the header in row 2
- copy all the data in this column
- loop though the hidden worksheets
- find and unhide the “Apple” worksheet
- paste the data in cell A1 in Worksheet “Apple”
- continue the loop and do the same for all the 53 columns in Worksheet “Export”
--> I would really appreciate if someone could give me hint on how to loop through the headers and more importantly on how to match the names of the headers and the name of the worksheets.
Thank you in advance for the help!