Hi guys - I am a complete newbie here, so please bare with me.
I have created a report in excel which effectively consists of about 3000 lines of data. I need to develop that into a report which can be printed. At the bottom of each page, I need to insert a "footer" which contains sub-totals of the numbers on that page, with a carried forward balance on the top of the page commencing page 2. I wuould really like to automate this functionality through VBA.
I envisage that the logic to answer my question will be as follows:
1. find the bottom of the first page break and insert a new row with the cell in column C to contain the calculations of the numbers above it and some text in that row in column D
2. at the top of the next page insert a new row with the cell in column C to contain the calculations of the numbers above it and some text in that row in column D
3. find the top of the next page and repeat 1 and 2
4. until the final page when item 1 is completed, we go to the last row and insrt another with the sub-total for the page and under that another row which contains the total of all of column C on all pages.
Row counting is not really an option to use to guage when to insert a row - each row varies in height as a result of the text in Column D, so I guess the only way is to work out the print area, work out what is the last row on that print area and insert a new row immediately above it (moving the old row to the first row on the next page).
I hope my question is clear - if any clarification is required please ask.
MTIA
Regards
DWE
I have created a report in excel which effectively consists of about 3000 lines of data. I need to develop that into a report which can be printed. At the bottom of each page, I need to insert a "footer" which contains sub-totals of the numbers on that page, with a carried forward balance on the top of the page commencing page 2. I wuould really like to automate this functionality through VBA.
I envisage that the logic to answer my question will be as follows:
1. find the bottom of the first page break and insert a new row with the cell in column C to contain the calculations of the numbers above it and some text in that row in column D
2. at the top of the next page insert a new row with the cell in column C to contain the calculations of the numbers above it and some text in that row in column D
3. find the top of the next page and repeat 1 and 2
4. until the final page when item 1 is completed, we go to the last row and insrt another with the sub-total for the page and under that another row which contains the total of all of column C on all pages.
Row counting is not really an option to use to guage when to insert a row - each row varies in height as a result of the text in Column D, so I guess the only way is to work out the print area, work out what is the last row on that print area and insert a new row immediately above it (moving the old row to the first row on the next page).
I hope my question is clear - if any clarification is required please ask.
MTIA
Regards
DWE