I'm looking for a formula that lets me take a dynamic column range and tell it to spill into the next column if it exceeds a certain number of rows.
The most rows I want in one column is 10,000. The results can be dynamic so I need the formula to be dynamic as well. I.e. if I have 25,000 rows in the original dataset, the formula should output 2 columns with 10,000 and 1 column of 5,000 of those results.
The same formula should be able to produce 4 columns of 10,000 rows from an original data set of 40,000 rows.
Here is a simplified example:
Similarly, the formula could flex to this:

