I need help programming something that will do an iterative cell entry and print one sheet for every item found in a list (list generated by SQL query) until the entire list has been printed.
Spreadsheet tabs are:
Chart
Data (single cell entry in cell B5)
TerritoryList (pertinent values in column A)
SQL query on the TerritoryList returns a list of all sales territories. Basically, for each of these territories (about 120), I have to enter the territory ID (from column A) into cell B5 on the Data page (which updates sales/summary/quota information for that territory, and then print the Chart page. Then move to the next territory on the TerritoryList, put its code in cell B5 on the Data page, print the chart, rinse, repeat.
Would really like to be able to macro/VBA this, of course.
To possibly complicate things, the output is to PDF; I can set the printer to print to PDF first, so that printing each chart goes there automatically, but it does prompt for a name for the pdf file to be saved (so the macro/VBA would need to incorporate that as well, incorporating the territory name into the file name).
Any thoughts/guidance? Thanks!
Bookmarks