Hi,
After pressing the "generate part" button, the code tests cell "E2":"Output - Part"
- if it is not empty, the code ends (there is a report in the sheet),
- if it is empty, the code continues,
After testing "E2", the code makes a copy of the source data from the sheet "Output - Part" to the sheet "Old_1".
And here I see:
- you deleted column "E" in the sheet "Output - Part", thereby fooling my test on "E2".
- you ran the macro on the old report, where for example the first number is listed 9 times. The macro then makes the same report 9 times.
To clarify: the code I wrote was mainly to verify its functionality.
It does not solve anything else.
It does not solve, for example, the situation described above = the code simply assumes that there are source numbers in column "A" that it should process.
If you write your suggestions on how it should work, I can add it.
For example. source data will be in one sheet, report in another - macro can be run repeatedly without limitation.
,(Level 4, 5, 6, etc)
The code cannot be easily adapted to more, or an indefinite number of levels.
It is certainly possible, but the code will be more complicated.
It's a shame you didn't mention it at the beginning.
m.s.
Bookmarks