Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing a sequence of pages
I have data associated with a number of districts. Each
district will have from 10 to 25 subsheets to print, depending on the number of outlets in that district. I have a listing of outlest reporting to each district in a sheet. a b c Dist 1 Dist 2 Dist 3 101 201 301 102 202 302 103 203 303 204 304 205 The actual reporting outlets are subject to change districts at any time, with a number of additions and deletions in each district-(so the listings of outlets are not fixed in length.)I can put the listings anywhere on the workbook as they are downloaded periodically. The actual number of districts will increase over time. I currently report performance for each outlet within any district on seperate sheets, with a final sheet for the district totals. (I have no issues with developing the totals, but rather the printing of sheets) I currently print through use of a recorded macro, but have "hardcoded" each sheet's macro into the procedure, requiring me to copy and paste a new routine, or delete a routine, with each change in the reporting structure. I am seaching for code that will read the list beneath each district, copy the outlet number into the page to be printed [which will update the data being printed, as well as identify the outlet (all handled)] until it reaches the end of the list, then moves to the next district, doing the same, until the final district is completed. (Then exits the routine). I would appreciate any code or advise with this routine. Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing a sequence of pages
Mike
You have just one sheet for reporting, and you change a cell on that sheet depending on which outlet you want to report? It sounds like you need something like this: Dim rDist as Range Dim rOut as Range Dim rAllOut as Range For Each rDist in Range("A1:C1") Set rAllOutRange = Range(rDist.Offset(1,0),Cells(65536,rDist.Column). End(xlUp)) For Each rOut in rAllOut.Cells Sheets("Report").Range("A1").Value = rOut.Value Sheets("Report").PrintOut Next rOut Next rDist -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Retail Mike" wrote in message ... I have data associated with a number of districts. Each district will have from 10 to 25 subsheets to print, depending on the number of outlets in that district. I have a listing of outlest reporting to each district in a sheet. a b c Dist 1 Dist 2 Dist 3 101 201 301 102 202 302 103 203 303 204 304 205 The actual reporting outlets are subject to change districts at any time, with a number of additions and deletions in each district-(so the listings of outlets are not fixed in length.)I can put the listings anywhere on the workbook as they are downloaded periodically. The actual number of districts will increase over time. I currently report performance for each outlet within any district on seperate sheets, with a final sheet for the district totals. (I have no issues with developing the totals, but rather the printing of sheets) I currently print through use of a recorded macro, but have "hardcoded" each sheet's macro into the procedure, requiring me to copy and paste a new routine, or delete a routine, with each change in the reporting structure. I am seaching for code that will read the list beneath each district, copy the outlet number into the page to be printed [which will update the data being printed, as well as identify the outlet (all handled)] until it reaches the end of the list, then moves to the next district, doing the same, until the final district is completed. (Then exits the routine). I would appreciate any code or advise with this routine. Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 printing problem--printing 1 document on 2 pages | Excel Discussion (Misc queries) | |||
Printing of pages | New Users to Excel | |||
printing on many pages | Excel Discussion (Misc queries) | |||
How do I delete pages in Excel? Keeps printing blank pages at end. | Charts and Charting in Excel | |||
Changing number sequence on different pages | Setting up and Configuration of Excel |