Originally Posted by
dax007
So in this case I do not need to use the for loop the way I used in my last post (#20)?
That is correct, the Do command is creating a loop anyway, for each time "My company name" appears in the source, so by using For and Next, you're effectively copying to every sheet for every instance of "my company name", I haven't tried that modification of the code, but at a glance, I think that it might be copying the first section of the report to each of the 24 sheets, then overwriting that with the second section, then the third, etc.
I had a senile moment when posting that suggested line of code, it should have been (ccount -1) at the end of the array, by default an array of 24 items is 0 to 23, not 1 to 24. But looking again, we need to reverse it, so I came up with this.
Personally, I would have the array in forward order and use the simpler method of (ccount -1) instead, although, unless you're going to change the order of the sheets, or add extra sheets in between, the second method in post #20 will be adequate for your needs.
Bookmarks