I have a long complex macro that I keep adding text to in order to improve. Right now it's perfect except for one last pet peeve item. Basically there is a report that we dump to excel and the macro formats the report, however sometimes the report is more than one page and there are two headers. I want to remove one header, but keep the other. Obviously the header is between different text depending on where the page break lands. I was able to write code to find certain things and delete the rows, however that deletes the page 1 header as well which I want to keep. These are financial statements and the header text is this:
Report ID: DC_COMPINC
Format ID: VARSUM
Reforecast Bud: MFC09
Style ID: @
However there are a bunch of blank rows as well. I'm not sure if this can be done, and certainly manually deleting the text is not a big deal I am just trying to automate as much as possible. From what I can tell there are a total of 10 rows that need to be deleted, the first 4 are the text above, plus 6 blank rows below that.
Report ID: DC_COMPINC
Format ID: VARSUM
Reforecast Bud: MFC09
Style ID: @
However there are a bunch of blank rows as well. I'm not sure if this can be done, and certainly manually deleting the text is not a big deal I am just trying to automate as much as possible. From what I can tell there are a total of 10 rows that need to be deleted, the first 4 are the text above, plus 6 blank rows below that.