I'm stuck on trying to figure this out.
I have a named range in Cell N10 that will automatically get incremented by 1 from 1 to 1000 using my current loop code, and based on the value in that cell (N10), a chart gets generated.
So for example:
if N10 = 1, a chart for District 1 will be generated
if N10 = 2, a chart for District 2 will be generated
if N10 = 900, a chart for District 900 will be generated
etc.
etc.
As you can imagine, based on my current code, this will happen until I hit District 1000.
The problem however is, that we do not have 1000 districts, as we skip several numbers in between 1-1000.
This is where things can get sloppy as the next step in my code is to upload these files to a server, resulting in hundreds of junk districts that simply do not exist (charts will appear as blank).
However, I've created a separate column, Z, that has a list of all the specific districts.
Where I'm stuck though, is I'm not quite certain how to:
1. Assign a value from Column Z to N10 (starting from whatever District value is in Z2)
2. Run my Macro to generate the chart
3. Loop to the next value in column Z, Z3, assign it to N10
4. Run my Macro to generate the chart
5. ...and keep repeating this process until I've hit the last value in column Z holding my actual district numbers
Any help would be immensely appreciated!
Bookmarks