Hello everyone,
Beginning in A1, I have a row (which I will call R1).
This row can be of varying size (79, 25, 43, 91, etc.) but is, at the most, 100 cells long.
The cells of R1 can contain any written element (numbers, letters, symbols, words, etc. but no formulas!).
Now, I wish to cut up R1 into smaller segments. For this, I want to use a second row (R2).
Beginning in A2, this row (R2) stipulates the number and size of the segments.
These segment-numbers are never larger than 20.
As an example, let’s say R2 is: 8, 3, 6, 6, 11, 19, etc.
The resultant segments would then be displayed from A4 onwards.
I would imagine it to somehow look like this:
[A1] X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X .............. (this is R1)
[A2] 8, 3, 6, 6, 11, 19, etc. (this R2)
[A3]
[A4] X, X, X, X, X, X, X, X (these are the segments)
[A5] X, X, X
[A6] X, X, X, X, X, X
[A7] X, X, X, X, X, X
[A8] X, X, X, X, X, X, X, X, X, X, X
Etc.
To recapitulate:
R1 is a long row of diverse data which I have from somewhere else and which I need to cut up. Ergo, the actual content of R1 (that is, the elements in each cell as well as the actual amount of cells) will always change (but will contain a maximum of 100 cells).
The numbers of R2 are also inputted by me and will also always change. As a rule, they are between 1 and 20; (i.e. there are no negative values in R2).
I hope this makes sense.
Two final points:
1. If the numbers of R2 are not enough to partition R1, R2 will start over again (and again) until R1 is fully divided into segments.
2. If the numbers of R2 are too many to partition R1, the function will stop automatically at the point where all elements of R1 have been divided. This would mean that R2 is not fully used.
I have a feeling this might be difficult and better done with Macros but I don’t know enough to assess this.
I would appreciate any pointers or advice.
Thank you in advance.
Bookmarks