Hi,
I have an excel file that copies entire data from sheet1 to sheet2. But for the sake of reporting, sheet2 only needs to have few columns than sheet1. I would like to find a way to use VBA to delete individual columns based on their headers. The code that i use now selects entire column based on column number and it is not effective as the what is in column B this week will not be the same next week. So I will have to change the column number in the code every time which is counter productive.
I've attached a sample file to show how two different weeks' data (in "Sheet1" and "Sheet2") looks like and how the report ("Report") should look like. In this file, the report copies all data from either Sheet 1 or Sheet 2 based on the week I am generating the report and then I need it to delete the extra columns, based on their header names.
Appreciate any help offered.
Thanks
Bookmarks